Skip to content

Commit b571c25

Browse files
committed
Merge branch 'es/freebsd-iconv-portability'
Build fix. * es/freebsd-iconv-portability: config.mak.uname: resolve FreeBSD iconv-related compilation warning
2 parents 0a866db + 6c6ce21 commit b571c25

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

config.mak.uname

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,17 @@ ifeq ($(uname_O),Cygwin)
192192
endif
193193
ifeq ($(uname_S),FreeBSD)
194194
NEEDS_LIBICONV = YesPlease
195-
OLD_ICONV = YesPlease
195+
# Versions up to 10.1 require OLD_ICONV; 10.2 and beyond don't.
196+
# A typical version string looks like "10.2-RELEASE".
197+
ifeq ($(shell expr "$(uname_R)" : '[1-9]\.'),2)
198+
OLD_ICONV = YesPlease
199+
endif
200+
ifeq ($(firstword $(subst -, ,$(uname_R))),10.0)
201+
OLD_ICONV = YesPlease
202+
endif
203+
ifeq ($(firstword $(subst -, ,$(uname_R))),10.1)
204+
OLD_ICONV = YesPlease
205+
endif
196206
NO_MEMMEM = YesPlease
197207
BASIC_CFLAGS += -I/usr/local/include
198208
BASIC_LDFLAGS += -L/usr/local/lib

0 commit comments

Comments
 (0)