Whamcloud - gitweb
Cleanup C code in debugfs's setfield. Added missing return statement (turned
authorTheodore Ts'o <tytso@mit.edu>
Wed, 19 Jan 2005 18:26:38 +0000 (13:26 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 19 Jan 2005 18:26:38 +0000 (13:26 -0500)
out it didn't cause a functional bug) and added #define _XOPEN_SOURCE on
non-Solaris systems to pick up strptime()'s definition.

debugfs/ChangeLog
debugfs/set_fields.c

index 55ed0bb..cc82355 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-19  Matthias Andree <matthias.andree@gmx.de>
+
+       * set_fields.c: Add _XOPEN_SOURCE #define on all but Solaris
+               systems so that strptime() gets defined.
+               (parse_bmap): Add missing return statement.
+
 2005-01-07  Theodore Ts'o  <tytso@mit.edu>
 
        * debug_cmds.ct: Make the official name of set_inode be
index da699a7..811edce 100644 (file)
@@ -9,6 +9,12 @@
  * %End-Header%
  */
 
+#ifndef __sun__
+       /* Solaris for some strange reason drops struct
+          timeval if _XOPEN_SOURCE defined */
+#define _XOPEN_SOURCE /* glibc2 needs this for strptime */
+#endif
+
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -356,6 +362,7 @@ static errcode_t parse_bmap(struct field_set_info *info, char *arg)
        if (retval) {
                com_err("set_inode", retval, "while setting block map");
        }
+       return retval;
 }