]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
generate-af-list.sh: slightly generalize pattern, fix w/musl (#8629)
authorWill Dietz <github@wdtz.org>
Sat, 31 Mar 2018 10:55:45 +0000 (05:55 -0500)
committerLennart Poettering <lennart@poettering.net>
Sat, 31 Mar 2018 10:55:45 +0000 (12:55 +0200)
Accept definitions to other AF_ constants, not just PF_ ones,
such as:

  #define AF_LINUX AF_LOCAL

It may not be necessary to impose any restriction on the
definitions of the macros extracted, but for now
keep most of that requirement but match AF_* as well.

src/basic/generate-af-list.sh

index fa74198e58a9071bc035c768dfeb2bed9dff8663..39e2dad5e7ab205ecec469df53677243e87f4b09 100755 (executable)
@@ -3,4 +3,4 @@ set -eu
 
 $1 -E -dM -include sys/socket.h - </dev/null | \
         grep -Ev 'AF_UNSPEC|AF_MAX' | \
-        awk '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $2; }'
+        awk '/^#define[ \t]+AF_[^ \t]+[ \t]+[AP]F_[^ \t]/ { print $2; }'