* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
* Lustre is a trademark of Sun Microsystems, Inc.
*/
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
WEXITSTATUS(rc) != 0)
abort();
- if (strlen(str) == len)
+ if (strnlen(str, len) == len)
str[len - 1] = 0;
if (str[strlen(str) - 1] == '\n')