adobkin / libcapn

A simple C Library for interact with the Apple Push Notification Service (APNs)
MIT License
100 stars 37 forks source link

Build problem referencing fcntl.h in apn.c #22

Closed hunger1 closed 8 years ago

hunger1 commented 8 years ago

apn.c should reference <fcntl.h>, not <sys/fcntl.h>. There is no <sys/fcntl.h> on some POSIX systems but you are guaranteed to have <fcntl,h> on all POSIX systems. If you do "man fcntl" on HP-UX, Linux , Mac OS X, and Solaris systems, it says to use <fcntl.h>.

Requires changing:

CHECK_INCLUDE_FILES (sys/fcntl.h APN_HAVE_SYS_FCNTL_H)

to:

CHECK_INCLUDE_FILES (fcntl.h APN_HAVE_FCNTL_H)

in CMakeLists.txt

and

#ifdef APN_HAVE_SYS_FCNTL_H #include <sys/fcntl.h>

to

#ifdef APN_HAVE_FCNTL_H #include <fcntl.h>

in apn.c

This change will also make it match jansson, which has:

check_include_files (fcntl.h HAVE_FCNTL_H)

adobkin commented 8 years ago

Fixed, tnx!