File: ftbfs-utime.patch

package info (click to toggle)
djbdns 1%3A1.05-22.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,180 kB
  • sloc: ansic: 15,836; makefile: 921; python: 728; sh: 237
file content (26 lines) | stat: -rw-r--r-- 500 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Use struct utimbuf as defined by POSIX
Forwarded: no
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2024-12-30

--- a/utime.c
+++ b/utime.c
@@ -8,7 +8,7 @@
 
 char *ustr;
 unsigned long u;
-time_t ut[2];
+struct utimbuf ut;
 
 int main(int argc,char **argv)
 {
@@ -19,7 +19,7 @@
   if (!ustr) _exit(100);
   scan_ulong(ustr,&u);
 
-  ut[0] = ut[1] = u;
-  if (utime(fn,ut) == -1) _exit(111);
+  ut.actime = ut.modtime = u;
+  if (utime(fn,&ut) == -1) _exit(111);
   _exit(0);
 }