]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2775] ntp-keygen.c fails to compile under Windows
authorHarlan Stenn <stenn@ntp.org>
Wed, 4 Mar 2015 11:16:31 +0000 (11:16 +0000)
committerHarlan Stenn <stenn@ntp.org>
Wed, 4 Mar 2015 11:16:31 +0000 (11:16 +0000)
bk: 54f6e98fstR2EjPfP7lqxp__eCm1mQ

ChangeLog
util/ntp-keygen.c

index 453620ee57d0e12c7256868935eba49c807c4b52..18b0257519357e56f42c34f9137ccb3a18da2afc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
 * [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
 * [Bug 2771] nonvolatile value is documented in wrong units.
 * [Bug 2773] Early leap announcement from Palisade/Thunderbolt
+* [Bug 2775] ntp-keygen.c fails to compile under Windows.
 ---
 (4.2.8p1) 2015/02/04 Released by Harlan Stenn <stenn@ntp.org>
 
index a4ebfe031acbb66d19091ef60e6dacbd05d0c256..853b49434b373ad6b680b4a8820f74bb54159cf8 100644 (file)
@@ -2170,13 +2170,19 @@ fheader (
        FILE    *str;           /* file handle */
        char    linkname[MAXFILENAME]; /* link name */
        int     temp;
+#ifdef HAVE_UMASK
         mode_t  orig_umask;
-
+#endif
+        
        snprintf(filename, sizeof(filename), "ntpkey_%s_%s.%u", file,
            owner, fstamp); 
+#ifdef HAVE_UMASK
         orig_umask = umask( S_IWGRP | S_IRWXO );
         str = fopen(filename, "w");
         (void) umask(orig_umask);
+#else
+        str = fopen(filename, "w");
+#endif
        if (str == NULL) {
                perror("Write");
                exit (-1);