From: Paul Eggert Date: Mon, 13 Dec 1999 04:52:26 +0000 (+0000) Subject: (decode_oflag): O_APPEND might not be defined. X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=aef747068b127bbf136b100db14ff7be5ea1b3aa;p=chaz%2Ftar (decode_oflag): O_APPEND might not be defined. --- diff --git a/src/rmt.c b/src/rmt.c index e960f10..e4e8f44 100644 --- a/src/rmt.c +++ b/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}, diff --git a/src/rtapelib.c b/src/rtapelib.c index 8ec2f81..19d2d2d 100644 --- a/src/rtapelib.c +++ b/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");