Skip to content

Commit ba4549d

Browse files
mrgalarixnia
authored andcommitted
Fix build with GCC 14: include <unistd.h> for read()/write()/rmdir(),
and sys/stat.h for mkdir(), and give main a return type.
1 parent a8762d7 commit ba4549d

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

benchmarks/postmark/distinfo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
$NetBSD: distinfo,v 1.7 2021/10/26 10:02:55 nia Exp $
1+
$NetBSD: distinfo,v 1.8 2025/10/07 03:56:29 mrg Exp $
22

33
BLAKE2s (postmark-1_5.c) = a08491a58ee305e43fd75ab8ec771f6675d3522078489d0d89c9bf9b07fb6709
44
SHA512 (postmark-1_5.c) = 721298cb5474f3619ddc5d17d54bc1d049eb2eb1412fafe498fb5d074aafbead4c55380e6ece3759651624c90dad6ab4fe5391e870da09791bc533362870866d
55
Size (postmark-1_5.c) = 46666 bytes
6+
SHA1 (patch-postmark.c) = 0c7bab67e5737d3311dfbcfa75ea44d05715a66b
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
$NetBSD: patch-postmark.c,v 1.1 2025/10/07 03:56:29 mrg Exp $
2+
3+
Include <unistd.h> for read()/write()/rmdir() and sys/stat.h for mkdir(),
4+
and give main a return type. Makes GCC 14 happy.
5+
6+
7+
--- postmark.c.orig 2025-09-29 15:03:55.078573258 -0700
8+
+++ postmark.c 2025-09-29 15:05:33.243049771 -0700
9+
@@ -51,6 +51,8 @@ Versions:
10+
#include <stdio.h>
11+
#include <string.h>
12+
#include <stdlib.h>
13+
+#include <unistd.h>
14+
+#include <sys/stat.h>
15+
#include <time.h>
16+
#include <fcntl.h>
17+
18+
@@ -1228,7 +1230,7 @@ char *buffer; /* temp storage for each
19+
}
20+
21+
/* main function - reads config files then enters get line/parse line loop */
22+
-main(argc,argv)
23+
+int main(argc,argv)
24+
int argc;
25+
char *argv[];
26+
{

0 commit comments

Comments
 (0)