diff options
author | xhe <xw897002528@gmail.com> | 2017-05-30 09:27:14 +0800 |
---|---|---|
committer | xhe <xw897002528@gmail.com> | 2017-05-30 09:54:44 +0800 |
commit | 2771fc569e41a1e37305383261c1231ea41d0825 (patch) | |
tree | 813df37848d70562841dd4fbba97597acf4504fe | |
parent | 6164461b7ee850da5b577b96b120e2a4b1b05a09 (diff) | |
download | gettext-tiny-2771fc569e41a1e37305383261c1231ea41d0825.tar.gz |
fix: functions of musl overrided by libintl.amusl
libvirt is linked to libintl.a, and functions of musl is overrided by those of libintl.a.
this commit adds a switch, use make MUSL=yes to install appropriate libintl.a and other files
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | libintl/libintl-musl.c | 5 |
2 files changed, 12 insertions, 4 deletions
@@ -5,7 +5,13 @@ libdir=$(prefix)/lib sysconfdir=$(prefix)/etc m4dir=$(prefix)/share/gettext-tiny -LIBSRC = $(sort $(wildcard libintl/*.c)) +ifeq ($(MUSL),yes) + LIBSRC = libintl/libintl-musl.c + HEADERS = +else + LIBSRC = libintl/libintl.c + HEADERS = libintl.h +endif PROGSRC = $(sort $(wildcard src/*.c)) PARSEROBJS = src/poparser.o src/StringEscape.o @@ -13,10 +19,7 @@ PROGOBJS = $(PROGSRC:.c=.o) LIBOBJS = $(LIBSRC:.c=.o) OBJS = $(PROGOBJS) $(LIBOBJS) - -HEADERS = libintl.h ALL_INCLUDES = $(HEADERS) - ALL_LIBS=libintl.a ALL_TOOLS=msgfmt msgmerge xgettext autopoint ALL_M4S=$(sort $(wildcard m4/*.m4)) diff --git a/libintl/libintl-musl.c b/libintl/libintl-musl.c new file mode 100644 index 0000000..eb00506 --- /dev/null +++ b/libintl/libintl-musl.c @@ -0,0 +1,5 @@ +#include <stdio.h> + +/* trick configure tests checking for gnu libintl, as in the copy included in gdb */ +const char *_nl_expand_alias () { return NULL; } +int _nl_msg_cat_cntr = 0; |