hroptatyr / dateutils

nifty command line date and time utilities; fast date calculations and conversion in the shell
http://www.fresse.org/dateutils/
Other
618 stars 42 forks source link

sys/sysctl.h has been removed from glibc (and linux) #109

Closed Earnestly closed 4 years ago

Earnestly commented 4 years ago

A very recent change in linux and glibc has seen removal of this header which yuck.c appears to use:

https://sourceware.org/git/?p=glibc.git;a=commit;h=076f09afbac1aa57756faa7a8feadb7936a724e4

This results in the following error during make:

  CC       yuck_bootstrap-yuck.o
In file included from /usr/include/unistd.h:25,
                 from yuck.c:53:
/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
yuck.c:68:10: fatal error: sys/sysctl.h: No such file or directory
   68 | #include <sys/sysctl.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:499: yuck_bootstrap-yuck.o] Error 1
make[2]: Leaving directory '/tmp/makepkg/dateutils-git/src/dateutils/build-aux'
make[1]: *** [Makefile:735: yuck.m4i] Error 2
make[1]: Leaving directory '/tmp/makepkg/dateutils-git/src/dateutils/build-aux'
/bin/sh: line 3: yuck: command not found
Making all in build-aux
make[1]: Entering directory '/tmp/makepkg/dateutils-git/src/dateutils/build-aux'
make  yuck-bootstrap
make[2]: Entering directory '/tmp/makepkg/dateutils-git/src/dateutils/build-aux'
  CC       yuck_bootstrap-yuck.o
In file included from /usr/include/unistd.h:25,
                 from yuck.c:53:
/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
yuck.c:68:10: fatal error: sys/sysctl.h: No such file or directory
   68 | #include <sys/sysctl.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
hroptatyr commented 4 years ago

Hi Earnestly, thanks for bringing this to my attention. A fix is in 6813ed9.

Earnestly commented 4 years ago

Thanks, everything is building without trouble now.