Fix minor build error in new strndupa() header

Wrong path to local strnlen.h file.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-06-06 11:04:17 +02:00
parent c1b3b76ea3
commit 12f619a320
2 changed files with 6 additions and 12 deletions
+3 -8
View File
@@ -23,9 +23,8 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
* ==========================================================================
*/
#ifndef GNU_STRING_STRNDUPA_H
#define GNU_STRING_STRNDUPA_H
#ifndef LITE_STRNDUPA_H_
#define LITE_STRNDUPA_H_
#if !defined(HAVE_STRNDUPA)
#if defined(strndupa)
@@ -33,14 +32,11 @@
#endif
#endif
#if !HAVE_STRNDUPA
#if defined(__GNUC__)
#include <stddef.h> /* size_t */
#include <string.h> /* memcpy(3) */
#include <gnu/string/strnlen.h>
#include "strnlen.h"
#define strndupa(src, lim) (__extension__ ({ \
size_t len_ = strnlen(src, lim); \
@@ -54,5 +50,4 @@
#endif /* __GNUC__ */
#endif /* !HAVE_STRNDUPA */
#endif /* GNU_STRING_STRNDUPA_H */
+3 -4
View File
@@ -15,8 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef LITE_STRNLEN_H
#define LITE_STRNLEN_H
#ifndef LITE_STRNLEN_H_
#define LITE_STRNLEN_H_
#if !defined(HAVE_STRNLEN)
#if defined(strnlen)
@@ -24,7 +24,6 @@
#endif
#endif
#if !HAVE_STRNLEN
#include <stddef.h> /* size_t */
@@ -41,4 +40,4 @@ static inline size_t xstrnlen(const char *str, size_t lim)
}
#endif
#endif /* LITE_STRNLEN_H */
#endif /* LITE_STRNLEN_H_ */