xenogenesi / hidclient

fork of Anselm Martin Hoffmeister's hidclient http://anselm.hoffmeister.be/computer/hidclient/index.html.en
GNU General Public License v2.0
74 stars 25 forks source link

stropts.h: No such file or directory #3

Open jgedarovich opened 7 years ago

jgedarovich commented 7 years ago

on fedora24

❯ gcc -o hidclient -O2 -lbluetooth -Wall hidclient.c

hidclient.c:105:21: fatal error: stropts.h: No such file or directory
 #include <stropts.h>
                     ^
compilation terminated.

I found some discussion around a similar error for an entirely different program here that also did the trick for me. after making the following change it compiled without issue.

diff --git a/hidclient.c b/hidclient.c
index 4050a8d..daf0df9 100644
--- a/hidclient.c
+++ b/hidclient.c
@@ -102,7 +102,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <stropts.h>
+//#include <stropts.h>
+#include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/types.h>
coder580 commented 6 years ago

i dont understand?

hallyn commented 2 years ago

i dont understand?

If you apply that diff, it allows hidclient to build on "recent" Ubuntus. (recent at this point might mean any supported Ubuntu) Thanks @jgedarovich