Skip to content

Commit eba08f0

Browse files
mandlSean Cross
authored and
Sean Cross
committed
bionic: fix gcc build
The memset() prototype from glibc includes __THROW and __nonnull as decorators, which are nonstandard. Remove these for additional compatibility with gcc. Additionally, remove linux/types.h and linux/string.h, and replace them with sys/types.h and sys/string.h.
1 parent e948d27 commit eba08f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/bionic.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ char * _strpbrk(const char *s1, const char *s2);
99
char *_strtok(char *str, const char *delim, char **saveptr);
1010
int _strcasecmp(const char *s1, const char *s2);
1111
void *_memcpy(void *dst0, const void *src0, size_t length);
12-
void *memset(void *__s, int __c, size_t __n) __THROW __nonnull ((1));
12+
void *memset(void *__s, int __c, size_t __n);
1313
unsigned long strtoul(const char *nptr, char **endptr, unsigned int base);
1414
int _strlen(const char *s);
1515
int _strnlen(const char *s, uint32_t maxlen);

vsprintf.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
*/
1313

1414
#include <stdarg.h>
15-
#include <linux/types.h>
16-
#include <linux/string.h>
15+
#include <sys/types.h>
16+
#include <sys/string.h>
1717
#include <errno.h>
1818
#include <stdint.h>
1919
#include "bionic.h"

0 commit comments

Comments
 (0)