diff options
author | Pascal Jäger <pascal.jaeger@leimstift.de> | 2023-10-03 13:03:35 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2024-02-01 16:15:14 +0200 |
commit | 00eb1d6f814de72e8ae3e2d5b267e39ebcc0e346 (patch) | |
tree | 04d866e6c5238ad608f869da40adff25d135d9bc /net-misc/clockspeed/files | |
parent | dev-util/qdevicemonitor: disable pedantic errors (diff) | |
download | gentoo-00eb1d6f814de72e8ae3e2d5b267e39ebcc0e346.tar.gz gentoo-00eb1d6f814de72e8ae3e2d5b267e39ebcc0e346.tar.bz2 gentoo-00eb1d6f814de72e8ae3e2d5b267e39ebcc0e346.zip |
net-misc/clockspeed: fix build for clang16
update EAPI 7 -> 8
Closes: https://bugs.gentoo.org/882307
Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
Closes: https://github.com/gentoo/gentoo/pull/33166
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-misc/clockspeed/files')
-rw-r--r-- | net-misc/clockspeed/files/clockspeed-0.62-fix-clang16-build.patch | 212 |
1 files changed, 212 insertions, 0 deletions
diff --git a/net-misc/clockspeed/files/clockspeed-0.62-fix-clang16-build.patch b/net-misc/clockspeed/files/clockspeed-0.62-fix-clang16-build.patch new file mode 100644 index 000000000000..66bc89d0c261 --- /dev/null +++ b/net-misc/clockspeed/files/clockspeed-0.62-fix-clang16-build.patch @@ -0,0 +1,212 @@ +Since clang16 implicit function declarations and implicit integers +result in a compilation error. + +Bug: https://bugs.gentoo.org/882307 +Patch has been sent upstream via mail + +Pascal Jäger <pascal.jaeger@leimstift.de> (2023-10-03) + +--- a/clockspeed.c ++++ b/clockspeed.c +@@ -1,6 +1,7 @@ ++#include <stdio.h> ++#include <sys/stat.h> + #include <sys/types.h> + #include <sys/time.h> +-#include "readwrite.h" + #include "exit.h" + #include "select.h" + #include "scan.h" +@@ -11,11 +12,12 @@ + #include "error.h" + #include "auto_home.h" + #include "timing.h" ++#include "unistd.h" + + #ifndef HASRDTSC + #ifndef HASGETHRTIME + +- Error! Need an unadjusted hardware clock. ++#error Need an unadjusted hardware clock. + + #endif + #endif +--- a/clockview.c ++++ b/clockview.c +@@ -1,3 +1,4 @@ ++#include <sys/time.h> + #include <sys/types.h> + #include <time.h> + #include "substdio.h" +--- a/hier.c ++++ b/hier.c +@@ -1,5 +1,24 @@ + #include "auto_home.h" + ++extern void h(char *home, ++int uid, ++int gid, ++int mode); ++ ++extern void d(char *home, ++char *subdir, ++int uid, ++int gid, ++int mode); ++ ++extern void c( ++char *home, ++char *subdir, ++char *file, ++int uid, ++int gid, ++int mode); ++ + void hier() + { + d("/var/lib","clockspeed",-1,-1,0755); +--- a/install.c ++++ b/install.c +@@ -2,8 +2,9 @@ + #include "strerr.h" + #include "error.h" + #include "open.h" +-#include "readwrite.h" + #include "exit.h" ++#include <sys/stat.h> ++#include <unistd.h> + + extern void hier(); + +--- a/instcheck.c ++++ b/instcheck.c +@@ -2,8 +2,9 @@ + #include <sys/stat.h> + #include "strerr.h" + #include "error.h" +-#include "readwrite.h" + #include "exit.h" ++#include <sys/stat.h> ++#include <unistd.h> + + extern void hier(); + +--- a/leapsecs_read.c ++++ b/leapsecs_read.c +@@ -1,7 +1,9 @@ ++#include <stdlib.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> + #include <errno.h> ++#include <unistd.h> + #include "tai.h" + #include "leapsecs.h" + +--- a/sntpclock.c ++++ b/sntpclock.c +@@ -3,12 +3,12 @@ + #include <sys/param.h> + #include <sys/socket.h> + #include <netinet/in.h> ++#include <unistd.h> + #include "strerr.h" + #include "ip.h" + #include "str.h" + #include "byte.h" + #include "substdio.h" +-#include "readwrite.h" + #include "select.h" + #include "scan.h" + #include "leapsecs.h" +@@ -79,7 +79,7 @@ int flagleap; + } + + char outbuf[16]; +-substdio ssout = SUBSTDIO_FDBUF(write,1,outbuf,sizeof outbuf); ++substdio ssout = SUBSTDIO_FDBUF((int(*)())write,1,outbuf,sizeof outbuf); + + #define FATAL "sntpclock: fatal: " + #define WARNING "sntpclock: warning: " +--- a/taiclock.c ++++ b/taiclock.c +@@ -3,17 +3,17 @@ + #include <sys/param.h> + #include <sys/socket.h> + #include <netinet/in.h> ++#include <unistd.h> + #include "strerr.h" + #include "ip.h" + #include "str.h" + #include "byte.h" + #include "substdio.h" +-#include "readwrite.h" + #include "select.h" + #include "taia.h" + + char outbuf[16]; +-substdio ssout = SUBSTDIO_FDBUF(write,1,outbuf,sizeof outbuf); ++substdio ssout = SUBSTDIO_FDBUF((int(*)())write,1,outbuf,sizeof outbuf); + + #define FATAL "taiclock: fatal: " + #define WARNING "taiclock: warning: " + +--- a/auto-str.c ++++ b/auto-str.c +@@ -5,7 +5,7 @@ + char buf1[256]; + substdio ss1 = SUBSTDIO_FDBUF(write,1,buf1,sizeof(buf1)); + +-void puts(s) ++void myputs(s) + char *s; + { + if (substdio_puts(&ss1,s) == -1) _exit(111); +@@ -25,20 +25,20 @@ char **argv; + value = argv[2]; + if (!value) _exit(100); + +- puts("char "); +- puts(name); +- puts("[] = \"\\\n"); ++ myputs("char "); ++ myputs(name); ++ myputs("[] = \"\\\n"); + + while (ch = *value++) { +- puts("\\"); ++ myputs("\\"); + octal[3] = 0; + octal[2] = '0' + (ch & 7); ch >>= 3; + octal[1] = '0' + (ch & 7); ch >>= 3; + octal[0] = '0' + (ch & 7); +- puts(octal); ++ myputs(octal); + } + +- puts("\\\n\";\n"); ++ myputs("\\\n\";\n"); + if (substdio_flush(&ss1) == -1) _exit(111); + _exit(0); + } +--- a/trygethr.c ++++ b/trygethr.c +@@ -1,7 +1,7 @@ + #include <sys/types.h> + #include <sys/time.h> + +-main() ++int main() + { + hrtime_t t; + +--- a/tryrdtsc.c ++++ b/tryrdtsc.c +@@ -1,4 +1,6 @@ +-main() ++#include <unistd.h> ++ ++int main() + { + unsigned long x[2]; + unsigned long y[2]; |