From 8ea19295a0407889cb8cd2f83ed3911d40dac1cf Mon Sep 17 00:00:00 2001 From: Josh Lilly Date: Thu, 11 Apr 2019 13:06:18 +1000 Subject: [PATCH] Compatibility with FreeBSD --- Makefile | 4 ++-- src/main.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 054d6a3..a178f7b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION=1.0.3 -CFLAGS+= -g -O2 -Wall -Wextra -D_FILE_OFFSET_BITS=64 -DVERSION=\"$(VERSION)\" -LDFLAGS+= -lgumbo -lcurl -lfuse -lcrypto +CFLAGS+= -g -O2 -Wall -Wextra -D_FILE_OFFSET_BITS=64 -DVERSION=\"$(VERSION)\" `pkg-config --cflags-only-I gumbo libcurl fuse` +LDFLAGS+= -lgumbo -lcurl -lfuse -lcrypto `pkg-config --libs-only-L gumbo libcurl fuse` COBJS = main.o network.o fuse_local.o link.o prefix ?= /usr/local diff --git a/src/main.c b/src/main.c index 04ae1f6..b78cef3 100644 --- a/src/main.c +++ b/src/main.c @@ -5,7 +5,11 @@ #include #include #include -#include +#ifdef __FreeBSD__ + #include +#else + #include +#endif #define ARG_LEN_MAX 64