瀏覽代碼

(decode_oflag): O_APPEND might not be defined.

Paul Eggert 25 年之前
父節點
當前提交
aef747068b
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 2 0
      src/rmt.c
  2. 2 0
      src/rtapelib.c

+ 2 - 0
src/rmt.c

@@ -204,7 +204,9 @@ decode_oflag (char const *oflag_string)
       struct name_value_pair { char const *name; int value; };
       static struct name_value_pair const table[] =
       {
+#ifdef O_APPEND
 	{"APPEND", O_APPEND},
+#endif
 	{"CREAT", O_CREAT},
 #ifdef O_DSYNC
 	{"DSYNC", O_DSYNC},

+ 2 - 0
src/rtapelib.c

@@ -328,7 +328,9 @@ encode_oflag (char *buf, int oflag)
     default: abort ();
     }
 
+#ifdef O_APPEND
   if (oflag & O_APPEND) strcat (buf, "|O_APPEND");
+#endif
   if (oflag & O_CREAT) strcat (buf, "|O_CREAT");
 #ifdef O_DSYNC
   if (oflag & O_DSYNC) strcat (buf, "|O_DSYNC");