Skip to content

Commit

Permalink
let CFLAGS autodetection choke on stack protector when the libc lacks it
Browse files Browse the repository at this point in the history
(Linux klibc) by introducing an array on the stack of main()
  • Loading branch information
mirabilos committed Oct 11, 2021
1 parent ba13db3 commit a7ea7f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
srcversion='$MirOS: src/bin/pax/Build.sh,v 1.23 2021/10/03 20:48:05 tg Exp $'
srcversion='$MirOS: src/bin/pax/Build.sh,v 1.24 2021/10/11 22:23:05 tg Exp $'
#-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2019,
Expand Down Expand Up @@ -339,7 +339,7 @@ ac_flags() {
ac_testn can_$vn '' "$ft" <<-'EOF'
/* evil apo'stroph in comment test */
#include <unistd.h>
int main(void) { return (isatty(0)); }
int main(void) { int t[2]; return (isatty(pipe(t))); }
EOF
#'
fi
Expand Down Expand Up @@ -399,6 +399,7 @@ addsrcs() {
esac
}

# --- main ---

curdir=`pwd` srcdir=`dirname "$0" 2>/dev/null`
case x$srcdir in
Expand Down

0 comments on commit a7ea7f4

Please sign in to comment.