]> eyrie.org Git - kerberos/krb5-strength.git/blobdiff - portable/mkstemp.c
Release 3.3
[kerberos/krb5-strength.git] / portable / mkstemp.c
index 2cbfe081249ff735e7dd890f6492ca7d862179ac..ebaefc1b5ee6ebd91732b364124654edde962251 100644 (file)
@@ -5,17 +5,18 @@
  * systems that don't have it.
  *
  * The canonical version of this file is maintained in the rra-c-util package,
- * which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
+ * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2009, 2011, 2014
+ *     The Board of Trustees of the Leland Stanford Junior University
  *
- * The authors hereby relinquish any claim to any copyright that they may have
- * in this work, whether granted under contract or by operation of law or
- * international treaty, and hereby commit to the public, at large, that they
- * shall not, at any time in the future, seek to enforce any copyright in this
- * work against any person or entity, or prevent any person or entity from
- * copying, publishing, distributing or creating derivative works of this
- * work.
+ * Copying and distribution of this file, with or without modification, are
+ * permitted in any medium without royalty provided the copyright notice and
+ * this notice are preserved.  This file is offered as-is, without any
+ * warranty.
+ *
+ * SPDX-License-Identifier: FSFAP
  */
 
 #include <config.h>
 
 #include <errno.h>
 #include <fcntl.h>
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+#    include <sys/time.h>
+#endif
+#include <time.h>
 
 /*
  * If we're running the test suite, rename mkstemp to avoid conflicts with the
@@ -31,8 +35,8 @@
  * another name.
  */
 #if TESTING
-# undef mkstemp
-# define mkstemp test_mkstemp
+#    undef mkstemp
+#    define mkstemp test_mkstemp
 int test_mkstemp(char *);
 #endif