Missing include required to build in OS X
mrmekon opened this issue · 2 comments
mrmekon commented
Problem
Current git tip fails to build on OS X because of an unknown identifier (fd_set) in rdpdr_main.h:60
Steps to reproduce
# git clone https://github.com/FreeRDP/FreeRDP.git # cd FreeRDP/ # sh autogen.sh # ./configure # make
Expected result
No error, built executable
Actual Result
Making all in channels/rdpdr CC rdpdr_la-rdpdr_main.lo CC rdpdr_la-rdpdr_capabilities.lo CC rdpdr_la-devman.lo In file included from rdpdr_scard.h:28, from devman.c:25: rdpdr_main.h:60: error: expected specifier-qualifier-list before 'fd_set' make[2]: *** [rdpdr_la-devman.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Proposed solution
Including select.h in rdpdr_main.h solved the problem. Patch below:
diff --git a/channels/rdpdr/rdpdr_main.h b/channels/rdpdr/rdpdr_main.h
index 5180347..a4b67c8 100644
--- a/channels/rdpdr/rdpdr_main.h
+++ b/channels/rdpdr/rdpdr_main.h
@@ -23,6 +23,8 @@
#include <pthread.h>
#include <freerdp/utils.h>
+#include <sys/select.h>
+
#include "rdpdr_types.h"
otavio commented
@awakecoding it seems you have OSX at hand. Could you check this issue?
awakecoding commented
rdpdr_main.h wasn't including sys/select.h which defines fd_set on Mac OS X. issue fixed and pushed on git.