ttouch: fix for OpenBSD. - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit a1c4307800c7f1ef9c5d71ba4c6c3642837e2877
 (DIR) parent dd7c4e51044ce779cb695d6b52bbba0982a42e28
 (HTM) Author: James Cook <falsifian@falsifian.org>
       Date:   Sat,  8 Aug 2020 01:54:00 +0000
       
       ttouch: fix for OpenBSD.
       
       This fixes https://github.com/9fans/plan9port/issues/436
       
       This doesn't necessarily address the underlying issue: calling p9create with
       mode = OREAD should probably be allowed, but currently doesn't work on
       OpenBSD.
       
       Diffstat:
         M src/cmd/touch.c                     |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/cmd/touch.c b/src/cmd/touch.c
       t@@ -54,7 +54,7 @@ touch(int nocreate, char *name)
                        fprint(2, "touch: %s: cannot wstat: %r\n", name);
                        return 1;
                }
       -        if((fd = create(name, OREAD, 0666)) < 0) {
       +        if((fd = create(name, OWRITE, 0666)) < 0) {
                        fprint(2, "touch: %s: cannot create: %r\n", name);
                        return 1;
                }