> sanei_usb.c: In function `sanei_usb_open': > sanei_usb.c:1049: warning: implicit declaration of function `fcntl' > sanei_usb.c:1049: error: `F_GETFL' undeclared (first use in this function) ^ typo > sanei_usb.c:1049: error: (Each undeclared identifier is reported only once > sanei_usb.c:1049: error: for each function it appears in.) > sanei_usb.c:1052: error: `F_SETFD' undeclared (first use in this function) > sanei_usb.c:1052: error: `FD_CLOEXEC' undeclared (first use in this function)
Be sure that your Makefile includes "-I/usr/include" in its flags (check your platform ( MinGW?) for similar dependencies) On linux all are included in normal Makefile. Mine are: sanei_usb.c: #include <fcntl.h> /usr/include/fcntl.h: #include <bits/fcntl.h> /usr/include/bits/fcntl.h: #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." #endif .. #define F_GETFD 1 /* Get file descriptor flags. */ #define F_SETFD 2 /* Set file descriptor flags. */ .. #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ regards, Gerald