我正在尝试在 osx 10.10 上编译 lirc latest (0.9.3.a),配置成功,但是 make 多次失败:
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 程序员,我想看看如果我注释掉代码会走多远。
我也试过编译以前的版本,他们也失败了。
关于如何解决这些问题的任何建议?