Merge commit '559eb2308b4d616590aba34bb8f4dd7f12ae4587'
[sliver-openvswitch.git] / utilities / ovs-ofctl.c
index ec775c7..9f97bbc 100644 (file)
@@ -151,7 +151,7 @@ parse_options(int argc, char *argv[])
         OFP_VERSION_OPTION_ENUMS,
         VLOG_OPTION_ENUMS
     };
-    static struct option long_options[] = {
+    static const struct option long_options[] = {
         {"timeout", required_argument, NULL, 't'},
         {"strict", no_argument, NULL, OPT_STRICT},
         {"readd", no_argument, NULL, OPT_READD},
@@ -1358,9 +1358,11 @@ monitor_vconn(struct vconn *vconn)
 
             if (timestamp) {
                 time_t now = time_wall();
+                struct tm tm;
                 char s[32];
 
-                strftime(s, sizeof s, "%Y-%m-%d %H:%M:%S: ", gmtime(&now));
+                strftime(s, sizeof s, "%Y-%m-%d %H:%M:%S: ",
+                         gmtime_r(&now, &tm));
                 fputs(s, stderr);
             }