Skip to content

Commit

Permalink
make: Avoid stdout for compiler tests
Browse files Browse the repository at this point in the history
Compiling to stdout fails at least with gcc 12 on Linux. Compile
directly to /dev/null instead.
  • Loading branch information
Zirias committed Jul 30, 2024
1 parent 636ca36 commit 15a6f1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ NODIST= poser/zimk

HAVE_KQUEUE= $(shell echo '#include <sys/event.h>\n'\
'int (*f)(void) = kqueue;' | \
$(or $(CC),cc) -xc -c -o- - >/dev/null 2>&1 && echo 1)
$(or $(CC),cc) -xc -c -o/dev/null - 2>/dev/null \
&& echo 1)
HAVE_INOTIFY= $(shell echo '#include <sys/inotify.h>\n'\
'int (*f)(void) = inotify_init;' | \
$(or $(CC),cc) -xc -c -o- - >/dev/null 2>&1 && echo 1)
$(or $(CC),cc) -xc -c -o/dev/null - 2>/dev/null \
&& echo 1)
BOOLCONFVARS_OFF+= $(if $(HAVE_KQUEUE),,WITH_KQUEUE) \
$(if $(HAVE_INOTIFY),,WITH_INOTIFY)
BOOLCONFVARS_ON+= $(if $(HAVE_KQUEUE),WITH_KQUEUE,) \
Expand Down

0 comments on commit 15a6f1a

Please sign in to comment.