From 33c5506e97dc04a46fb7e06c03de144b66788520 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 18:52:21 +0100 Subject: disable build warnings in utils Disable some build warnings in utils. Signed-off-by: Peter S. Mazinger --- utils/getconf.c | 1 + utils/ldconfig.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/getconf.c b/utils/getconf.c index 812783ecf..5ff98e6fc 100644 --- a/utils/getconf.c +++ b/utils/getconf.c @@ -15,6 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#define _GNU_SOURCE 1 #include #include #include diff --git a/utils/ldconfig.c b/utils/ldconfig.c index a25de260a..024be7ca4 100644 --- a/utils/ldconfig.c +++ b/utils/ldconfig.c @@ -568,7 +568,7 @@ static char *get_extpath(void) if ((file = fopen(realconffile, "r")) != NULL) { fstat(fileno(file), &st); res = xmalloc(st.st_size + 1); - fread(res, 1, st.st_size, file); + (void)fread(res, 1, st.st_size, file); fclose(file); res[st.st_size] = '\0'; -- cgit v1.2.3 From 624be66cb9b350d5c6538fca8592cdb3a4c23d37 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 19:15:32 +0100 Subject: try to fix duplicated slashes in the generated lib*.so files Try to fix duplicated slashes in the generated lib*.so files and make sure that on installation the *bin directories are really created (avoid the misbehaviour of creating usrbin dir). Signed-off-by: Peter S. Mazinger --- utils/Makefile.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'utils') diff --git a/utils/Makefile.in b/utils/Makefile.in index 65364d771..f3e67eb52 100644 --- a/utils/Makefile.in +++ b/utils/Makefile.in @@ -119,14 +119,14 @@ install-y += utils_install # This installs both utils and hostutils, so doesn't depend on either. utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) - $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf + $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)/bin/getconf ifeq ($(HAVE_SHARED),y) - $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd - $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig + $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)/bin/ldd + $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)/sbin/ldconfig endif ifeq ($(UCLIBC_HAS_LOCALE),y) - $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv - #$(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale + $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)/bin/iconv + #$(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)/bin/locale endif -- cgit v1.2.3 From 80f5587940c2cd110d06c615db252c8122a3c697 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sun, 6 Mar 2011 15:40:09 +0100 Subject: Revert "try to fix duplicated slashes in the generated lib*.so files" This reverts commit 624be66cb9b350d5c6538fca8592cdb3a4c23d37. Signed-off-by: Peter S. Mazinger --- utils/Makefile.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'utils') diff --git a/utils/Makefile.in b/utils/Makefile.in index f3e67eb52..65364d771 100644 --- a/utils/Makefile.in +++ b/utils/Makefile.in @@ -119,14 +119,14 @@ install-y += utils_install # This installs both utils and hostutils, so doesn't depend on either. utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) - $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)/bin/getconf + $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf ifeq ($(HAVE_SHARED),y) - $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)/bin/ldd - $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)/sbin/ldconfig + $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd + $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig endif ifeq ($(UCLIBC_HAS_LOCALE),y) - $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)/bin/iconv - #$(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)/bin/locale + $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv + #$(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale endif -- cgit v1.2.3 From 85f4b028d767fc390a7b866d2f58d58be489242d Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 30 Mar 2011 04:51:22 -0700 Subject: utils/ldd: Check for returned pointer from strrchr not the value it holds Signed-off-by: Kevin Day Signed-off-by: Khem Raj --- utils/ldd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/ldd.c b/utils/ldd.c index 3858c815c..904075c23 100644 --- a/utils/ldd.c +++ b/utils/ldd.c @@ -553,7 +553,7 @@ static struct library *find_elf_interpreter(ElfW(Ehdr) *ehdr) interp_name = strdup(s); interp_dir = strdup(s); tmp = strrchr(interp_dir, '/'); - if (*tmp) + if (tmp) *tmp = '\0'; else { free(interp_dir); -- cgit v1.2.3