diff --git a/libc/calls/pledge-linux.c b/libc/calls/pledge-linux.c index 368a91113..11d7e5bd7 100644 --- a/libc/calls/pledge-linux.c +++ b/libc/calls/pledge-linux.c @@ -977,13 +977,13 @@ static privileged void OnSigSys(int sig, siginfo_t *si, void *vctx) { if (HasSyscall(kPledge + i, si->si_syscall)) { Log("error: pledge ", kPledge[i].name, " for ", GetSyscallName(si->si_syscall), " (ord=", ord, " rip=", rip, ")\n", - 0); + NULL); found = true; } } if (!found) { Log("error: bad syscall (", GetSyscallName(si->si_syscall), " ord=", ord, - " rip=", rip, ")\n", 0); + " rip=", rip, ")\n", NULL); } switch (mode & PLEDGE_PENALTY_MASK) { case PLEDGE_PENALTY_KILL_PROCESS: diff --git a/libc/isystem/strings.h b/libc/isystem/strings.h index 1c6fc89fb..6dcf85003 100644 --- a/libc/isystem/strings.h +++ b/libc/isystem/strings.h @@ -1,5 +1,6 @@ #ifndef COSMOPOLITAN_LIBC_ISYSTEM_STRINGS_H_ #define COSMOPOLITAN_LIBC_ISYSTEM_STRINGS_H_ +#include "libc/nexgen32e/ffs.h" #include "libc/str/locale.h" #include "libc/str/str.h" diff --git a/libc/x/x.h b/libc/x/x.h index 09cf0ba54..ae4a07cab 100644 --- a/libc/x/x.h +++ b/libc/x/x.h @@ -30,7 +30,7 @@ char *xstrndup(const char *, size_t) paramsnonnull() returnspointerwithnoaliases dontthrow nocallback dontdiscard returnsnonnull; char *xstrcat(const char *, ...) paramsnonnull((1)) nullterminated() returnspointerwithnoaliases dontthrow nocallback dontdiscard returnsnonnull; -#define xstrcat(...) (xstrcat)(__VA_ARGS__, 0) +#define xstrcat(...) (xstrcat)(__VA_ARGS__, NULL) char *xstrmul(const char *, size_t) paramsnonnull((1)) returnspointerwithnoaliases dontthrow nocallback dontdiscard returnsnonnull; char *xinet_ntop(int, const void *) paramsnonnull() diff --git a/libc/x/xjoinpaths.c b/libc/x/xjoinpaths.c index 8dcdc863a..78deae1d4 100644 --- a/libc/x/xjoinpaths.c +++ b/libc/x/xjoinpaths.c @@ -43,6 +43,6 @@ char *xjoinpaths(const char *path, const char *other) { } else if (_endswith(path, "/")) { return xstrcat(path, other); } else { - return xstrcat(path, '/', other); + return xstrcat(path, (uintptr_t)'/', other); } }