From 5e4c6de73a023e480a909aac1eb23d93ceb4d0fa Mon Sep 17 00:00:00 2001 From: Tim van der Molen Date: Mon, 15 Jun 2020 19:51:36 +0200 Subject: Enable --version-sort on systems without strverscmp() The --version-sort option requires strverscmp(), but this is a glibc extension that does not exist on OpenBSD and other systems. To enable --version-sort on those systems, provide an internal implementation of strverscmp(). The implementation is from the musl C library and is MIT-licensed. The build process remains the same: the verscmp flag should be set to 1 only if strverscmp() is available in libc. If verscmp is 0, then the internal implementation is used. --- src/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index ac4d2fe..10e33eb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -34,6 +34,10 @@ ifeq (${exif},1) exif_nikon.c endif +ifneq (${verscmp},1) + TARGETS += strverscmp.c +endif + OBJECTS = ${TARGETS:.c=.o} I_SRCS = ${shell echo *.raw} -- cgit v1.2.3