This is an automated email from Gerrit.

"Antonio Borneo <[email protected]>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9795

-- gerrit

commit 0ac9a2335806c13de8ddb0da3c61d3160d3d65d5
Author: Antonio Borneo <[email protected]>
Date:   Thu Jul 23 15:04:19 2026 +0200

    riscv: include 'config.h' as first
    
    The file 'config.h' contains macros that can impact the host
    include files, like '_GNU_SOURCE'.
    It should be included as first, before including any other file,
    either system generic and OpenOCD specific include files.
    
    Change-Id: Ia9342eeb7901449a23adb821b500ffd831e56953
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/target/riscv/riscv-011.c b/src/target/riscv/riscv-011.c
index 717a9cb577..8294b82d8c 100644
--- a/src/target/riscv/riscv-011.c
+++ b/src/target/riscv/riscv-011.c
@@ -5,13 +5,13 @@
  * spec, but SiFive made some silicon that uses it.
  */
 
-#include <assert.h>
-#include <stdlib.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include <assert.h>
+#include <stdlib.h>
+
 #include "riscv-011.h"
 
 #include "target/target.h"
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index b4664d2a7f..d8a2e12510 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -5,14 +5,14 @@
  * latest draft.
  */
 
-#include <assert.h>
-#include <stdint.h>
-#include <stdlib.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include <assert.h>
+#include <stdint.h>
+#include <stdlib.h>
+
 #include "target/target.h"
 #include "target/algorithm.h"
 #include "target/target_type.h"
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index 30094b34b5..9badeba2ac 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -1,12 +1,13 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <assert.h>
 #include <stdlib.h>
 #include <time.h>
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
 
 #include <helper/log.h>
 #include <helper/time_support.h>

-- 

Reply via email to