aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make.sh2
-rw-r--r--scripts/mkflags.c13
2 files changed, 5 insertions, 10 deletions
diff --git a/scripts/make.sh b/scripts/make.sh
index 07bf2ac8..50415e55 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -103,7 +103,7 @@ then
# for it.
> generated/optlibs.dat
- for i in util crypt m resolv selinux smack attr rt
+ for i in util crypt m resolv selinux smack attr rt crypto
do
echo "int main(int argc, char *argv[]) {return 0;}" | \
${CROSS_COMPILE}${CC} $CFLAGS -xc - -o generated/libprobe -Wl,--as-needed -l$i > /dev/null 2>/dev/null &&
diff --git a/scripts/mkflags.c b/scripts/mkflags.c
index 8b3d0aa3..27fc5172 100644
--- a/scripts/mkflags.c
+++ b/scripts/mkflags.c
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
for (;;) {
struct flag *flist, *aflist, *offlist;
- char *gaps, *mgaps, c;
+ char *mgaps;
unsigned bit;
*command = *flags = *allflags = 0;
@@ -142,14 +142,9 @@ int main(int argc, char *argv[])
bit = 0;
printf("// %s %s %s\n", command, flags, allflags);
mgaps = mark_gaps(flags, allflags);
- for (gaps = mgaps; *gaps == 1; gaps++);
- if (*gaps) c = '"';
- else {
- c = ' ';
- gaps = "0";
- }
- printf("#undef OPTSTR_%s\n#define OPTSTR_%s %c%s%c\n",
- command, command, c, gaps, c);
+ // If command disabled, use allflags for OLDTOY()
+ printf("#undef OPTSTR_%s\n#define OPTSTR_%s \"%s\"\n",
+ command, command, strcmp(flags, " ") ? mgaps : allflags);
free(mgaps);
flist = digest(flags);