FreeBSD build fix (#59)

This commit is contained in:
David CARLIER 2023-12-28 13:53:21 +00:00 committed by GitHub
parent 7630658ed0
commit d1af167387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 3 deletions

4
ir.c
View File

@ -20,7 +20,9 @@
#ifndef _WIN32
# include <sys/mman.h>
# include <alloca.h>
# if defined(__linux__) || defined(__sun)
# include <alloca.h>
# endif
#else
# define WIN32_LEAN_AND_MEAN
# include <windows.h>

View File

@ -13,6 +13,10 @@
# include <dlfcn.h>
# include <unistd.h>
# include <fcntl.h>
# include <limits.h>
# if defined(__FreeBSD__) || defined(__DragonFly__)
# include <sys/sysctl.h>
# endif
#endif
#include "ir.h"

View File

@ -12,7 +12,7 @@
#ifdef _WIN32
# include <windows.h>
#else
#elif defined(__linux__) || defined(__sun)
# include <alloca.h>
#endif

View File

@ -22,6 +22,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
# include <limits.h>
#if defined(__linux__)
#include <sys/syscall.h>

View File

@ -25,7 +25,9 @@
# include <sys/wait.h>
# include <dirent.h>
# include <unistd.h>
# include <alloca.h>
# if defined(__linux__) || defined(__sun)
# include <alloca.h>
# endif
# define PATH_SEP '/'
# define DEFAULT_DIFF_CMD "diff --strip-trailing-cr -u"
# define O_BINARY 0