{"action":"created","issue":{"url":"https://api.github.com/repos/wolfcw/libfaketime/issues/99","repository_url":"https://api.github.com/repos/wolfcw/libfaketime","labels_url":"https://api.github.com/repos/wolfcw/libfaketime/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/wolfcw/libfaketime/issues/99/comments","events_url":"https://api.github.com/repos/wolfcw/libfaketime/issues/99/events","html_url":"https://github.com/wolfcw/libfaketime/issues/99","id":186080538,"number":99,"title":"unknown type name 'clock_serv_t' under macOS Sierra","user":{"login":"maximveksler","id":550550,"avatar_url":"https://avatars.githubusercontent.com/u/550550?v=3","gravatar_id":"","url":"https://api.github.com/users/maximveksler","html_url":"https://github.com/maximveksler","followers_url":"https://api.github.com/users/maximveksler/followers","following_url":"https://api.github.com/users/maximveksler/following{/other_user}","gists_url":"https://api.github.com/users/maximveksler/gists{/gist_id}","starred_url":"https://api.github.com/users/maximveksler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximveksler/subscriptions","organizations_url":"https://api.github.com/users/maximveksler/orgs","repos_url":"https://api.github.com/users/maximveksler/repos","events_url":"https://api.github.com/users/maximveksler/events{/privacy}","received_events_url":"https://api.github.com/users/maximveksler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-10-29T14:12:49Z","updated_at":"2016-11-10T12:44:14Z","closed_at":null,"body":"Unfortunately can't get it to compile, even with adding mach/clock.h and co.. \n\n```\n➜  src git:(master) make\ncc -o libfaketime.o -c -std=gnu99 -Wall -Wextra -Werror -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='\"'/usr/local'\"' -DLIBDIRNAME='\"'/lib/faketime'\"'  libfaketime.c\nlibfaketime.c:154:46: error: unknown type name 'clock_serv_t'\nstatic int          (*real_clock_get_time)  (clock_serv_t clock_serv, mach_timespec_t *cur_timeclockid_t);\n                                             ^\nlibfaketime.c:154:71: error: unknown type name 'mach_timespec_t'\nstatic int          (*real_clock_get_time)  (clock_serv_t clock_serv, mach_timespec_t *cur_timeclockid_t);\n                                                                      ^\nlibfaketime.c:156:8: error: unknown type name 'clock_serv_t'\nstatic clock_serv_t clock_serv_real;\n       ^\nlibfaketime.c:182:16: error: implicit declaration of function 'OSSwapBigToHostInt64' is invalid in C99 [-Werror,-Wimplicit-function-declaration]\n  tp->tv_sec = be64toh(saved->sec);\n               ^\nlibfaketime.c:68:20: note: expanded from macro 'be64toh'\n#define be64toh(x) OSSwapBigToHostInt64(x)\n                   ^\nlibfaketime.c:311:3: error: use of undeclared identifier 'clock_serv_t'; did you mean 'clock_serv_real'?\n  clock_serv_t cclock;\n  ^~~~~~~~~~~~\n  clock_serv_real\nlibfaketime.c:156:21: note: 'clock_serv_real' declared here\nstatic clock_serv_t clock_serv_real;\n                    ^\nlibfaketime.c:312:3: error: use of undeclared identifier 'mach_timespec_t'\n  mach_timespec_t mts;\n  ^\nlibfaketime.c:313:3: error: implicit declaration of function 'host_get_clock_service' is invalid in C99 [-Werror,-Wimplicit-function-declaration]\n  host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clock_serv_real);\n  ^\nlibfaketime.c:313:26: error: implicit declaration of function 'mach_host_self' is invalid in C99 [-Werror,-Wimplicit-function-declaration]\n  host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clock_serv_real);\n                         ^\nlibfaketime.c:313:44: error: use of undeclared identifier 'CALENDAR_CLOCK'\n  host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clock_serv_real);\n                                           ^\nlibfaketime.c:314:44: error: use of undeclared identifier 'mts'\n  (*real_clock_get_time)(clock_serv_real, &mts);\n                                           ^\nlibfaketime.c:315:26: error: use of undeclared identifier 'mts'\n  systime->real.tv_sec = mts.tv_sec;\n                         ^\nlibfaketime.c:316:27: error: use of undeclared identifier 'mts'\n  systime->real.tv_nsec = mts.tv_nsec;\n                          ^\nlibfaketime.c:317:44: error: use of undeclared identifier 'SYSTEM_CLOCK'\n  host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);\n                                           ^\nlibfaketime.c:317:59: error: use of undeclared identifier 'cclock'\n  host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);\n                                                          ^\nlibfaketime.c:318:26: error: use of undeclared identifier 'cclock'\n  (*real_clock_get_time)(cclock, &mts);\n                         ^\nlibfaketime.c:318:35: error: use of undeclared identifier 'mts'\n  (*real_clock_get_time)(cclock, &mts);\n                                  ^\nlibfaketime.c:319:3: error: implicit declaration of function 'mach_port_deallocate' is invalid in C99 [-Werror,-Wimplicit-function-declaration]\n  mach_port_deallocate(mach_task_self(), cclock);\n  ^\nlibfaketime.c:319:24: error: implicit declaration of function 'mach_task_self' is invalid in C99 [-Werror,-Wimplicit-function-declaration]\n  mach_port_deallocate(mach_task_self(), cclock);\n                       ^\nlibfaketime.c:319:24: note: did you mean 'mach_host_self'?\nlibfaketime.c:313:26: note: 'mach_host_self' declared here\n  host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clock_serv_real);\n                         ^\nlibfaketime.c:319:42: error: use of undeclared identifier 'cclock'; did you mean 'clock'?\n  mach_port_deallocate(mach_task_self(), cclock);\n                                         ^~~~~~\n                                         clock\n/usr/include/time.h:108:9: note: 'clock' declared here\nclock_t clock(void) __DARWIN_ALIAS(clock);\n        ^\nfatal error: too many errors emitted, stopping now [-ferror-limit=]\n20 errors generated.\nmake: *** [libfaketime.o] Error 1\n```\n\nThe definitions are defined\n\n```\n➜  src git:(master) grep -R clock_serv_t /usr/include\n/usr/include/mach/clock.defs:       clock_serv  : clock_serv_t;\n/usr/include/mach/clock.defs:       clock_serv  : clock_serv_t;\n/usr/include/mach/clock.defs:       clock_serv  : clock_serv_t;\n/usr/include/mach/clock.h:  clock_serv_t clock_serv,\n/usr/include/mach/clock.h:  clock_serv_t clock_serv,\n/usr/include/mach/clock.h:  clock_serv_t clock_serv,\n/usr/include/mach/clock_types.defs:type clock_serv_t = mach_port_t\n/usr/include/mach/clock_types.defs:     cusertype: clock_serv_t\n/usr/include/mach/clock_types.defs:     intran: clock_serv_t convert_port_to_clock(mach_port_t)\n/usr/include/mach/clock_types.defs:     outtran: mach_port_t convert_clock_to_port(clock_serv_t)\n/usr/include/mach/mach_host.defs:   out clock_serv  : clock_serv_t);\n/usr/include/mach/mach_host.h:  clock_serv_t *clock_serv\n/usr/include/mach/mach_types.h:typedef mach_port_t      clock_serv_t;\n/usr/include/mach/mach_types.h:typedef clock_serv_t     clock_serv_port_t;\n```\n\nhelp would be appreciated.\n"},"comment":{"url":"https://api.github.com/repos/wolfcw/libfaketime/issues/comments/259680911","html_url":"https://github.com/wolfcw/libfaketime/issues/99#issuecomment-259680911","issue_url":"https://api.github.com/repos/wolfcw/libfaketime/issues/99","id":259680911,"user":{"login":"thedrow","id":48936,"avatar_url":"https://avatars.githubusercontent.com/u/48936?v=3","gravatar_id":"","url":"https://api.github.com/users/thedrow","html_url":"https://github.com/thedrow","followers_url":"https://api.github.com/users/thedrow/followers","following_url":"https://api.github.com/users/thedrow/following{/other_user}","gists_url":"https://api.github.com/users/thedrow/gists{/gist_id}","starred_url":"https://api.github.com/users/thedrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedrow/subscriptions","organizations_url":"https://api.github.com/users/thedrow/orgs","repos_url":"https://api.github.com/users/thedrow/repos","events_url":"https://api.github.com/users/thedrow/events{/privacy}","received_events_url":"https://api.github.com/users/thedrow/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T12:44:14Z","updated_at":"2016-11-10T12:44:14Z","body":"I'm also seeing that the date command outputs the real time instead of the fake one."}}
{"actor":{"display_login":"thedrow"}}