mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-03 07:42:10 +01:00
81 lines
2.8 KiB
Diff
81 lines
2.8 KiB
Diff
Author: Vlad Glagolev <scm@vaygr.net>
|
|
URL: based on https://bugs.gentoo.org/707452
|
|
Summary: fixes build with recent compilers, modern sort(1), musl
|
|
diff --git a/mksigname.sh b/mksigname.sh
|
|
index 164f5b8..bdb918b 100644
|
|
--- a/mksigname.sh
|
|
+++ b/mksigname.sh
|
|
@@ -40,7 +40,7 @@ fi
|
|
trap 'rc=$?; rm -f $tmpin $tmpout; trap 0; exit $rc' $trapsigs
|
|
|
|
CC="${CC:-cc}"
|
|
-CPP="${CPP:-${CC} -E -C}"
|
|
+CPP="${CPP:-${CC} -E -C -P}"
|
|
|
|
cat <<__EOF__
|
|
/*
|
|
@@ -86,7 +86,7 @@ sed -n -e 's|"\(..\)", /|"\1", /|' \
|
|
-e 's|"\(..*\)", /|"\1", /|' \
|
|
-e 's|^[ ]*QwErTy \([0-9]\)[ ]|/* \1 */ |p' \
|
|
-e 's|^[ ]*QwErTy \([0-9][0-9]*\)[ ]|/* \1 */ |p' < $tmpout | \
|
|
- sort -n +1 | \
|
|
+ sort -n -k2 | \
|
|
awk 'BEGIN {
|
|
last = 0;
|
|
nsigs = 0;
|
|
diff --git a/newsyslog.c b/newsyslog.c
|
|
index 6d814c9..f4b4c4f 100644
|
|
--- a/newsyslog.c
|
|
+++ b/newsyslog.c
|
|
@@ -423,12 +423,12 @@ do_entry(ent)
|
|
|
|
assert(domidnight == -1 || domidnight == 1 || domidnight == 0);
|
|
if (verbose) {
|
|
- printf("## %s [%s(%lu):%s(%lu)] 0%03o <#%u,%s%s%s%s%s>: ",
|
|
+ printf("## %s [%s(%lu):%s(%lu)] 0%03o <#%u,%s%s%s%s%s%s>: ",
|
|
ent->log,
|
|
ent->user ? ent->user : "",
|
|
- (unsigned long) (ent->uid == NO_ID) ? (write_metalog ? 0 : geteuid()) : ent->uid,
|
|
+ (unsigned long) ((ent->uid == NO_ID) ? (write_metalog ? 0 : geteuid()) : ent->uid),
|
|
ent->group ? ent->group : "",
|
|
- (unsigned long) (ent->gid == NO_ID) ? (write_metalog ? 0 : getegid()) : ent->gid,
|
|
+ (unsigned long) ((ent->gid == NO_ID) ? (write_metalog ? 0 : getegid()) : ent->gid),
|
|
ent->permissions,
|
|
ent->numlogs,
|
|
(ent->flags & CE_SUBDIR) ? "subdir," : "",
|
|
diff --git a/sig2str.c b/sig2str.c
|
|
index c05da8a..43f1e2a 100644
|
|
--- a/sig2str.c
|
|
+++ b/sig2str.c
|
|
@@ -65,7 +65,7 @@ extern const unsigned int sys_nsigname; /* also from sys_signame.c */
|
|
#endif
|
|
|
|
#if !defined(SYS_SIGNAME_DECLARED)
|
|
-const char *const sys_signame[]; /* defined in sys_signame.c */
|
|
+extern const char *const sys_signame[]; /* defined in sys_signame.c */
|
|
#endif
|
|
|
|
#if !defined(HAVE_DECL_SIG2STR)
|
|
diff --git a/str2sig.c b/str2sig.c
|
|
index 65e730d..d485e0f 100644
|
|
--- a/str2sig.c
|
|
+++ b/str2sig.c
|
|
@@ -31,7 +31,7 @@ static const char rcsid[] =
|
|
#include "newsyslog.h" /* generic portability definitions */
|
|
|
|
#if !defined(SYS_SIGNAME_DECLARED)
|
|
-const char *const sys_signame[]; /* defined in signame.c */
|
|
+extern const char *const sys_signame[]; /* defined in signame.c */
|
|
#endif
|
|
|
|
/* NetBSD gained sys_nsig sometime just prior to 1.4 */
|
|
@@ -67,7 +67,7 @@ extern const unsigned int sys_nsigname; /* also from sys_signame.c */
|
|
#endif
|
|
|
|
#if !defined(SYS_SIGNAME_DECLARED)
|
|
-const char *const sys_signame[]; /* defined in sys_signame.c */
|
|
+extern const char *const sys_signame[]; /* defined in sys_signame.c */
|
|
#endif
|
|
|
|
#if !defined(HAVE_DECL_STR2SIG)
|