Re: [dev] dwm 6.4 compilation error on FreeBsd

From: NRK <nrk_AT_disroot.org>
Date: Thu, 16 Feb 2023 12:23:00 +0600

> dwm.c:1549:31: error: use of undeclared identifier 'SA_NOCLDWAIT'
> sa.sa_flags = SA_NOCLDSTOP | SA_NOCLDWAIT | SA_RESTART;
> ^
> dwm.c:1549:46: error: use of undeclared identifier 'SA_RESTART'
> sa.sa_flags = SA_NOCLDSTOP | SA_NOCLDWAIT | SA_RESTART;

Both of those are specified by POSIX and the FreeBSD manpage has it as well:
https://man.freebsd.org/cgi/man.cgi?query=sigaction&apropos=0&sektion=0&manpath=FreeBSD+13.1-RELEASE+and+Ports&arch=default&format=html

I think we might need to define `_XOPEN_SOURCE=700L`. Does this fix the
issue:

        diff --git a/config.mk b/config.mk
         # flags
        -CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
        +CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}

- NRK
Received on Thu Feb 16 2023 - 07:23:00 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 16 2023 - 07:24:11 CET