diff options
| author | pooka <pooka@NetBSD.org> | 2014-11-29 13:23:48 +0000 |
|---|---|---|
| committer | pooka <pooka@NetBSD.org> | 2014-11-29 13:23:48 +0000 |
| commit | f731ef5a05e47e56faf9c06ce7fd84b2b0550d8d (patch) | |
| tree | 388fb8850ea89bf5eabaf93ffbb77243cdcb36ea /include | |
| parent | ec65f20cc13a28a6ce04d798962820910ad11662 (diff) | |
Create the stpncpy() inline only when GCC>=4.8 || clang
Mirrors the stpncpy() wrapper macro and avoids the following:
warning: implicit declaration of function ‘__builtin___stpncpy_chk’
Diffstat (limited to 'include')
| -rw-r--r-- | include/ssp/string.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ssp/string.h b/include/ssp/string.h index 730504a87b3..68dfdf66199 100644 --- a/include/ssp/string.h +++ b/include/ssp/string.h @@ -1,4 +1,4 @@ -/* $NetBSD: string.h,v 1.12 2014/04/25 18:37:38 pooka Exp $ */ +/* $NetBSD: string.h,v 1.13 2014/11/29 13:23:48 pooka Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -83,7 +83,9 @@ __ssp_bos_icheck3_restrict(memcpy, void *, const void *) __ssp_bos_icheck3(memmove, void *, const void *) __ssp_bos_icheck3(memset, void *, int) __ssp_bos_icheck2_restrict(stpcpy, char *, const char *) +#if __GNUC_PREREQ__(4,8) || defined(__clang__) __ssp_bos_icheck3_restrict(stpncpy, char *, const char *) +#endif __ssp_bos_icheck2_restrict(strcpy, char *, const char *) __ssp_bos_icheck2_restrict(strcat, char *, const char *) __ssp_bos_icheck3_restrict(strncpy, char *, const char *) |
