我試圖編譯LIRC最新(0.9.3.a)在OSX 10.10,配置是成功的,但是做失敗了幾次:編譯在OSX 10.10 MAKE LIRC失敗
lircd.cpp:748:6: error: no matching function for call to 'getgrouplist'
r = getgrouplist(user, pw->pw_gid, groups, &group_cnt);
^~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/unistd.h:648:6: note: candidate function not viable: no known conversion from 'gid_t [32]' to 'int *' for 3rd argument
int getgrouplist(const char *, int, int *, int *);
如果我註釋掉問題的代碼,並再次運行,我得到:
irexec.cpp:62:3: error: use of undeclared identifier 'strdupa'; did you mean 'strdup'?
strdupa(SH_PATH), strdupa("-c"), strdupa(cmd), NULL
^~~~~~~
strdup
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/string.h:117:7: note: 'strdup' declared here
char *strdup(const char *);
如果我改變strupa到strup,那麼接下來的失敗是:
In file included from irpipe.cpp:17:
../drivers/irpipe/irpipe.h:3:10: fatal error: 'asm-generic/ioctl.h' file not found
#include <asm-generic/ioctl.h>
現在我知道只是註釋掉代碼並不能解決問題,但是我不是C程序員,而且我想知道如果我註釋掉代碼會得到多少。
我也嘗試編譯以前的版本,他們也失敗了。
關於如何解決這些問題的任何建議?
「修正以上」應爲「修復之下」,對不起 – leamas
您可以自由[編輯]你的答案解決的事情。 – Tsyvarev