{"action":"created","issue":{"url":"https://api.github.com/repos/wahern/cqueues/issues/69","labels_url":"https://api.github.com/repos/wahern/cqueues/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/wahern/cqueues/issues/69/comments","events_url":"https://api.github.com/repos/wahern/cqueues/issues/69/events","html_url":"https://github.com/wahern/cqueues/issues/69","id":88325053,"number":69,"title":"Portability issues","user":{"login":"fabled","id":389042,"avatar_url":"https://avatars.githubusercontent.com/u/389042?v=3","gravatar_id":"","url":"https://api.github.com/users/fabled","html_url":"https://github.com/fabled","followers_url":"https://api.github.com/users/fabled/followers","following_url":"https://api.github.com/users/fabled/following{/other_user}","gists_url":"https://api.github.com/users/fabled/gists{/gist_id}","starred_url":"https://api.github.com/users/fabled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabled/subscriptions","organizations_url":"https://api.github.com/users/fabled/orgs","repos_url":"https://api.github.com/users/fabled/repos","events_url":"https://api.github.com/users/fabled/events{/privacy}","received_events_url":"https://api.github.com/users/fabled/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wahern/cqueues/labels/packaging/portability","name":"packaging/portability","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-15T05:41:25Z","updated_at":"2015-06-16T07:26:54Z","closed_at":null,"body":"Building the latest git head on Alpine Linux (using musl c-library) is successful, but has the following issues:\r\n\r\n1. LIST_MOVE conflicts the one in newer BSD sys/queue.h (than the one in glibc):\r\n\r\ncqueues/src/lib/notify.c:159:0: warning: \"LIST_MOVE\" redefined\r\n #define LIST_MOVE(head, elm, le) do { \\\r\n ^\r\nIn file included from cqueues/src/lib/notify.c:34:0:\r\n/usr/include/sys/queue.h:214:0: note: this is the location of the previous definition\r\n #define LIST_MOVE(head1, head2) do {     \\\r\n ^\r\n\r\nThe inline LIST_MOVE seems to do a different thing. The BSD LIST_MOVE move the whole list chain from one headnode to another. Your LIST_MOVE seems to remove and requeue a single list entry. Consider renaming it - e.g. LIST_REQUEUE or similar.\r\n\r\n2. Several of the feature tests do not yield correct results and cannot be overrided:\r\n\r\n./src/cqueues.h:#define HAVE_EVENTFD (__linux && (GLIBC_PREREQ(2, 9) || UCLIBC_PREREQ(0, 9, 33)))\r\n./src/lib/kpoll.c:#define HAVE_EPOLL_CREATE1 (HAVE_EPOLL && __GLIBC_PREREQ(2, 9))\r\n./src/lib/kpoll.c:#define HAVE_PIPE2 __GLIBC_PREREQ(2, 9)\r\n\r\nmusl supports all of the above. There is no simple preprocessor directive to detect this though. The proper way to do this is to have ./configure type script to test the availability of these features; otherwise it'd be broken when the feature is implemented and you'd need manually to track all possible c-libraries and their versions.\r\n\r\nSee also: http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F\r\n  \r\nAs minimum it'd be nice to have #ifndef around these HAVE_* so I can as temporary workaround add them to CFLAGS. But in long term, it'd be better to have simple configure script to test if these features are available."},"comment":{"url":"https://api.github.com/repos/wahern/cqueues/issues/comments/112320380","html_url":"https://github.com/wahern/cqueues/issues/69#issuecomment-112320380","issue_url":"https://api.github.com/repos/wahern/cqueues/issues/69","id":112320380,"user":{"login":"fabled","id":389042,"avatar_url":"https://avatars.githubusercontent.com/u/389042?v=3","gravatar_id":"","url":"https://api.github.com/users/fabled","html_url":"https://github.com/fabled","followers_url":"https://api.github.com/users/fabled/followers","following_url":"https://api.github.com/users/fabled/following{/other_user}","gists_url":"https://api.github.com/users/fabled/gists{/gist_id}","starred_url":"https://api.github.com/users/fabled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabled/subscriptions","organizations_url":"https://api.github.com/users/fabled/orgs","repos_url":"https://api.github.com/users/fabled/repos","events_url":"https://api.github.com/users/fabled/events{/privacy}","received_events_url":"https://api.github.com/users/fabled/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T07:26:54Z","updated_at":"2015-06-16T07:26:54Z","body":"Alpine's sys/queue.h is provided by bsd-compat-headers package which comes from:\r\n  http://git.alpinelinux.org/cgit/aports/tree/main/libc-dev\r\n\r\nThe header copy originates from NetBSD and is located at:\r\n  http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h"}}