Thread (13 messages) flat view 13 messages, 1 author, 2021-08-16
STALE1816d

[PATCH 4/3] fixup! reftable: add dump utility

From: Carlo Marcelo Arenas Belón <hidden>
Date: 2021-08-04 06:45:08
Subsystem: the rest · Maintainer: Linus Torvalds

avoid _XOPEN_SOURCE in alpine by making sure git-compat-util.h is included
first (through hash.h) as recommended and therefore avoid:

  In file included from ./hash.h:4,
                   from reftable/dump.c:19:
  ./git-compat-util.h:147: warning: "_XOPEN_SOURCE" redefined
    147 | #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
        |
  In file included from /usr/include/unistd.h:8,
                   from reftable/reftable-writer.h:15,
                   from reftable/dump.c:14:
  /usr/include/features.h:16: note: this is the location of the previous definition
     16 | #define _XOPEN_SOURCE 700
        |

Signed-off-by: Carlo Marcelo Arenas Belón <redacted>
---
This allows for the alpine CI job to build, but will still fail with the
reported segfault in the subcommand for `git reflog`.

It is important to note that it only happens in "seen" though, as the same
code merged to master pass that test (even if it might fail somewhere else)

 reftable/dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/reftable/dump.c b/reftable/dump.c
index 668cfa8996..eb7b2b4161 100644
--- a/reftable/dump.c
+++ b/reftable/dump.c
@@ -6,6 +6,7 @@ license that can be found in the LICENSE file or at
 https://developers.google.com/open-source/licenses/bsd
 */
 
+#include "hash.h"
 #include "reftable-blocksource.h"
 #include "reftable-error.h"
 #include "reftable-merged.h"
@@ -16,7 +17,6 @@ license that can be found in the LICENSE file or at
 #include "reftable-reader.h"
 #include "reftable-stack.h"
 #include "reftable-generic.h"
-#include "hash.h"
 
 #include <stddef.h>
 #include <stdio.h>
-- 
2.33.0.rc0.443.g98cc19b6c0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help