* libc/machine/mips/strncpy.c: Include stdint.h to get uintptr_t.
(strncpy): Cast src to uintptr_t before checking alignment with "&".
+2008-07-07 Hans-Peter Nilsson <hp@axis.com>
+
+ * libc/machine/mips/strncpy.c: Include stdint.h to get uintptr_t.
+ (strncpy): Cast src to uintptr_t before checking alignment with "&".
+
2008-07-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/argz/argz_count.c: Include stddef.h to get size_t.
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
+#include <stdint.h>
#if !defined(__GNUC__) || (__GNUC__ < 3)
#define __builtin_expect(a,b) a
* a segfault for the case where the source pointer is unaligned,
* the null terminator is in valid memory, but reading 2 or 4 bytes at a
* time blindly eventually goes outside of valid memory. */
- while ((src & (UNROLL_FACTOR - 1)) != 0 && count > 0)
+ while (((uintptr_t) src & (UNROLL_FACTOR - 1)) != 0 && count > 0)
{
*dst++ = ch = *src++;
--count;