This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/7] Fix _STRING_ARCH_unaligned -Wundef warnings
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 17 Mar 2014 09:31:56 -0300
- Subject: Re: [PATCH 2/7] Fix _STRING_ARCH_unaligned -Wundef warnings
- Authentication-results: sourceware.org; auth=none
- References: <1395059004-20960-1-git-send-email-will dot newton at linaro dot org> <1395059004-20960-2-git-send-email-will dot newton at linaro dot org>
On 17-03-2014 09:23, Will Newton wrote:
> ChangeLog:
>
> 2014-03-17 Will Newton <will.newton@linaro.org>
>
> * crypt/md5.c: Check whether _STRING_ARCH_unaligned
> is defined with #ifdef rather than #if.
> * crypt/sha256.c: Likewise.
> * crypt/sha512.c: Likewise.
> * include/arpa/nameser.h: Likewise.
> * stdlib/getenv.c: Likewise.
> * string/bits/string2.h: Likewise.
> ---
> crypt/md5.c | 2 +-
> crypt/sha256.c | 2 +-
> crypt/sha512.c | 2 +-
> include/arpa/nameser.h | 2 +-
> stdlib/getenv.c | 8 ++++----
> string/bits/string2.h | 10 +++++-----
> 6 files changed, 13 insertions(+), 13 deletions(-)
>
I fixed it with less changes by:
diff --git a/include/string.h b/include/string.h
index 8323412..c9bee10 100644
--- a/include/string.h
+++ b/include/string.h
@@ -1,5 +1,7 @@
#ifndef _STRING_H
+#define _STRING_ARCH_unaligned 0
+
#ifndef _ISOMAC
#include <sys/types.h>
It will also shows for arch that this flags can be set if arch supports it.