[PATCH] maint: Fix undefined signal definition.
Collin Funk <[email protected]> Wed, 25 Sep 2024 19:13:13 -0700
| Newsgroups | gmane.comp.version-control.rcs.bugs |
|---|---|
| Message-ID | <[email protected]> |
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Hi Paul,
Another minor patch. When this is in configure:
checking that `mmap' is sane... yes
checking signal received if referencing nonexistent part of mmapped file...=
SIGBUS
The MMAP_SIGNAL macro gets defined to SIGBUS. This causes a compilation
error since signal.h needs to be included.
In file included from base.h:24,
from b-fro.c:24:
b-fro.c: In function =E2=80=98fro_open=E2=80=99:
../lib/config.h:1318:21: error: =E2=80=98SIGBUS=E2=80=99 undeclared (first =
use in this function)
1318 | #define MMAP_SIGNAL SIGBUS
| ^~~~~~
b-fro.c:85:8: note: in expansion of macro =E2=80=98MMAP_SIGNAL=E2=80=99
85 | ? (MMAP_SIGNAL && status->st_size
| ^~~~~~~~~~~
../lib/config.h:1318:21: note: each undeclared identifier is reported only =
once for each function it appears in
1318 | #define MMAP_SIGNAL SIGBUS
| ^~~~~~
b-fro.c:85:8: note: in expansion of macro =E2=80=98MMAP_SIGNAL=E2=80=99
85 | ? (MMAP_SIGNAL && status->st_size
| ^~~~~~~~~~~
make[2]: *** [Makefile:2112: b-fro.o] Error 1
Collin
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
filename=0001-maint-Fix-undefined-signal-definition.patch
From 14511db9614883933bafc40cfc286cce4c4408e0 Mon Sep 17 00:00:00 2001
From: Collin Funk <[email protected]>
Date: Wed, 25 Sep 2024 19:08:52 -0700
Subject: [PATCH] maint: Fix undefined signal definition.
* src/b-fro.c: Include signal.h.
---
src/b-fro.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/b-fro.c b/src/b-fro.c
index 5dc6d6d..06259c4 100644
--- a/src/b-fro.c
+++ b/src/b-fro.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h> /* strchr */
+#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
--
2.46.1
--=-=-=--