void-packages/srcpkgs/feh/patches/musl-strings.patch
Peter Bui 3a46cfacf4 feh: update to 2.23
Add patch to fix building on musl environments: need to define
_BSD_SOURCE so that when string.h is included, strings.h is also
included.

Closes: #10524 [via git-merge-pr]
2018-01-08 10:52:33 +01:00

16 lines
690 B
Diff

feh.h includes X11/Xos.h which in turn includes string.h. In musl
environments, strings.h is not implicitly included unless we define either
_BSD_SOURCE or _GNU_SOURCE. Therefore, add -D_BSD_SOURCE so that when string.h
is included, it also includes strings.h.
--- ./config.mk 2018-01-07 14:26:09.423820119 -0500
+++ ./config.mk 2018-01-07 14:26:17.411888240 -0500
@@ -38,7 +38,7 @@
CFLAGS += -Wall -Wextra -pedantic
# Settings for glibc >= 2.19 - may need to be adjusted for other systems
-CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500
+CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
ifeq (${curl},1)
CFLAGS += -DHAVE_LIBCURL