FS#47314 - [libbsd] includes wrong version of cdefs.h
Attached to Project:
Arch Linux
Opened by Gabriel Southern (southerngs) - Thursday, 10 December 2015, 02:19 GMT
Last edited by Lukas Fleischer (lfleischer) - Saturday, 20 February 2016, 20:51 GMT
Opened by Gabriel Southern (southerngs) - Thursday, 10 December 2015, 02:19 GMT
Last edited by Lukas Fleischer (lfleischer) - Saturday, 20 February 2016, 20:51 GMT
|
Details
Description:
Cannot compile application that includes <bsd/unistd.h>. I think that the problem is that the unistd.h file in libbsd is including <sys/cdefs.h> rather than <bsd/sys/cdefs.h>. I don't know for sure though. The change that made this problem visible to me is in unistd.h there is the following change: $ diff libbsd-0.8.0/include/bsd/unistd.h libbsd-0.7.0/include/bsd/unistd.h 63,64c63 < void setproctitle(const char *fmt, ...) < __printflike(1, 2); --- > void setproctitle(const char *fmt, ...); But the __printflike macro is not available in <sys/cflags.h> although it is in <sys/bsd/cflags.h>. This leads to compilation errors when including <bsd/unistd.h>. Beyond that I don't know enough about libbsd and its packaging in Arch to know the root cause and whether this is a problem with upstream or with Arch. Additional info: * libbsd 0.8.0-1 Steps to reproduce: $ cat > test2.c <<-EOF #include <bsd/unistd.h> int main() { return 0; } EOF $ gcc test2.c In file included from test2.c:1:0: /usr/include/bsd/unistd.h: In function ‘setproctitle’: /usr/include/bsd/unistd.h:64:2: error: expected declaration specifiers before ‘__printflike’ __printflike(1, 2); ^ test2.c:2:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token int main() { ^ In file included from test2.c:1:0: /usr/include/bsd/unistd.h:63:6: error: old-style parameter declarations in prototyped function definition void setproctitle(const char *fmt, ...) ^ test2.c:4:1: error: expected ‘{’ at end of input } ^ |
This task depends upon
Closed by Lukas Fleischer (lfleischer)
Saturday, 20 February 2016, 20:51 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 0.8.2-2.
Saturday, 20 February 2016, 20:51 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 0.8.2-2.
Comment by
Ivan Shapovalov (intelfx) -
Wednesday, 23 December 2015, 09:57 GMT
This is resolved in libbsd 0.8.1
(http://cgit.freedesktop.org/libbsd/commit/?id=48ac79b1883981f5135b5b9c76ca268e6cbe65b2).
Will flag the relevant package out-of-date.