-# strndup.m4 serial 8
+# strndup.m4 serial 9
dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
AC_CACHE_CHECK([for working strndup], gl_cv_func_strndup,
[AC_RUN_IFELSE([
- AC_LANG_PROGRAM([#include <string.h>], [[
+ AC_LANG_PROGRAM([#include <string.h>
+ #include <stdlib.h>], [[
#ifndef HAVE_DECL_STRNDUP
extern char *strndup (const char *, size_t);
#endif