Add some defines to build succesfully on FreeBSD

Tested on FreeBSD 13.2 only.  FreeBSD is more similar to Mac OS X in
system-level library support than it is to Linux.
This commit is contained in:
Mike Swanson
2023-06-10 13:26:19 -07:00
parent cf8a2aa50a
commit c848642845
2 changed files with 8 additions and 2 deletions

View File

@@ -66,6 +66,9 @@ extern void seekdir(DIR *, long);
extern int closedir(DIR *);
# define rewinddir(dirp) seekdir(dirp, 0L)
#elif defined(__FreeBSD__)
/* FreeBSD uses dirent.h instead of sys/dir.h */
# include <dirent.h>
#else
/* On linux and macOS, use the standard functions and types */
# include <sys/dir.h>