{"action":"created","issue":{"url":"https://api.github.com/repos/openntpd-portable/openntpd-portable/issues/23","repository_url":"https://api.github.com/repos/openntpd-portable/openntpd-portable","labels_url":"https://api.github.com/repos/openntpd-portable/openntpd-portable/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/openntpd-portable/openntpd-portable/issues/23/comments","events_url":"https://api.github.com/repos/openntpd-portable/openntpd-portable/issues/23/events","html_url":"https://github.com/openntpd-portable/openntpd-portable/issues/23","id":148552545,"number":23,"title":"5.9p1 broken on RHEL 6 (and other older linux varients)","user":{"login":"pbhenson","id":299344,"avatar_url":"https://avatars.githubusercontent.com/u/299344?v=3","gravatar_id":"","url":"https://api.github.com/users/pbhenson","html_url":"https://github.com/pbhenson","followers_url":"https://api.github.com/users/pbhenson/followers","following_url":"https://api.github.com/users/pbhenson/following{/other_user}","gists_url":"https://api.github.com/users/pbhenson/gists{/gist_id}","starred_url":"https://api.github.com/users/pbhenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbhenson/subscriptions","organizations_url":"https://api.github.com/users/pbhenson/orgs","repos_url":"https://api.github.com/users/pbhenson/repos","events_url":"https://api.github.com/users/pbhenson/events{/privacy}","received_events_url":"https://api.github.com/users/pbhenson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-15T04:33:31Z","updated_at":"2016-04-25T05:05:39Z","closed_at":"2016-04-24T08:24:47Z","body":"configure fails to find clock_gettime on RHEL 6:\r\n\r\n```\r\nconfigure:12343: checking for clock_gettime                                                                   \r\nconfigure:12343: cc -std=gnu99 -o conftest   -Wno-pointer-sign -Wall -std=gnu99 -fno-strict-aliasing  -D_DEFAU\r\nLT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE -Wl,-R/usr/pkg/lib  conftest.c  >&5                     \r\n/tmp/ccAEypp8.o: In function `main':                                                                          \r\nconftest.c:(.text+0xa): undefined reference to `clock_gettime'                                                \r\ncollect2: ld returned 1 exit status                                                                           \r\n```\r\n\r\nHowever, the function does exist, but you need to link to librt to find it:\r\n\r\n```\r\nCLOCK_GETRES(2)            Linux Programmer’s Manual           CLOCK_GETRES(2\r\n                                                                             \r\nNAME                                                                         \r\n       clock_getres, clock_gettime, clock_settime - clock and time functions \r\n                                                                             \r\nSYNOPSIS                                                                     \r\n       #include <time.h>                                                     \r\n                                                                             \r\n       int clock_getres(clockid_t clk_id, struct timespec *res);             \r\n                                                                             \r\n       int clock_gettime(clockid_t clk_id, struct timespec *tp);             \r\n                                                                             \r\n       int clock_settime(clockid_t clk_id, const struct timespec *tp);       \r\n                                                                             \r\n       Link with -lrt.                                                       \r\n\r\nThis results in a compile failure:\r\n\r\n  CC       arc4random.lo                                                    \r\nIn file included from ../include/time.h:6,                                  \r\n                 from /usr/include/pthread.h:26,                            \r\n                 from arc4random_linux.h:28,                                \r\n                 from arc4random.h:10,                                      \r\n                 from arc4random.c:66:                                      \r\n/usr/include/time.h:336: error: conflicting types for 'clock_gettime'       \r\n../include/time.h:22: note: previous declaration of 'clock_gettime' was here\r\n*** Error code 1                                                            \r\n```\r\n\r\nThis is evidently only an issue on distributions with glibc older than 2.17.\r\n\r\nAny thoughts on the best approach to resolving this?"},"comment":{"url":"https://api.github.com/repos/openntpd-portable/openntpd-portable/issues/comments/214132305","html_url":"https://github.com/openntpd-portable/openntpd-portable/issues/23#issuecomment-214132305","issue_url":"https://api.github.com/repos/openntpd-portable/openntpd-portable/issues/23","id":214132305,"user":{"login":"pbhenson","id":299344,"avatar_url":"https://avatars.githubusercontent.com/u/299344?v=3","gravatar_id":"","url":"https://api.github.com/users/pbhenson","html_url":"https://github.com/pbhenson","followers_url":"https://api.github.com/users/pbhenson/followers","following_url":"https://api.github.com/users/pbhenson/following{/other_user}","gists_url":"https://api.github.com/users/pbhenson/gists{/gist_id}","starred_url":"https://api.github.com/users/pbhenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbhenson/subscriptions","organizations_url":"https://api.github.com/users/pbhenson/orgs","repos_url":"https://api.github.com/users/pbhenson/repos","events_url":"https://api.github.com/users/pbhenson/events{/privacy}","received_events_url":"https://api.github.com/users/pbhenson/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T05:05:39Z","updated_at":"2016-04-25T05:05:39Z","body":"Yup, looks good; compiles and runs fine on RHEL 6 now, thanks. The configure.ac change is the same as what I tried but I didn't know about the check-libc-compat.m4 stuff."}}