https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125940

--- Comment #8 from Marc Poulhiès <dkm at gcc dot gnu.org> ---
I've tested your patch. Unless I incorrectly applied it, it doesn't work:

```
22452 │ 2026-06-23T17:54:13.1241180Z ../../../libgomp/config/linux/numa.c:57:1:
error: redefinition of ‘gomp_get_current_numa_node’
22453 │ 2026-06-23T17:54:13.1241990Z    57 | gomp_get_current_numa_node ()
22454 │ 2026-06-23T17:54:13.1242722Z       | ^~~~~~~~~~~~~~~~~~~~~~~~~~
22455 │ 2026-06-23T17:54:13.1243832Z ../../../libgomp/config/linux/numa.c:40:1:
note: previous definition of ‘gomp_get_current_numa_node’ with type ‘int(void)’
22456 │ 2026-06-23T17:54:13.1244805Z    40 | gomp_get_current_numa_node ()
22457 │ 2026-06-23T17:54:13.1245245Z       | ^~~~~~~~~~~~~~~~~~~~~~~~~~
22458 │ 2026-06-23T17:54:13.1246050Z ../../../libgomp/config/linux/numa.c:65:1:
error: redefinition of ‘gomp_get_numa_distance’
22459 │ 2026-06-23T17:54:13.1246864Z    65 | gomp_get_numa_distance (int node1,
int node2)
22460 │ 2026-06-23T17:54:13.1247377Z       | ^~~~~~~~~~~~~~~~~~~~~~
22461 │ 2026-06-23T17:54:13.1248402Z ../../../libgomp/config/linux/numa.c:46:1:
note: previous definition of ‘gomp_get_numa_distance’ with type ‘int(int, 
int)’
22462 │ 2026-06-23T17:54:13.1249616Z    46 | gomp_get_numa_distance (int node1,
int node2)
22463 │ 2026-06-23T17:54:13.1250116Z       | ^~~~~~~~~~~~~~~~~~~~~~
22464 │ 2026-06-23T17:54:13.1250796Z ../../../libgomp/config/linux/numa.c: In
function ‘gomp_get_numa_distance’:
22465 │ 2026-06-23T17:54:13.1252131Z
../../../libgomp/config/linux/numa.c:80:13: error: implicit declaration of
function ‘strncmp’ [-Wimplicit-function-declaration]
22466 │ 2026-06-23T17:54:13.1253726Z    80 |         if (strncmp ("node",
dp->d_name, 4 /* strlen ("node") */) == 0)
22467 │ 2026-06-23T17:54:13.1254364Z       |             ^~~~~~~
22468 │ 2026-06-23T17:54:13.1255326Z ../../../libgomp/config/linux/numa.c:37:1:
note: include ‘<string.h>’ or provide a declaration of ‘strncmp’
22469 │ 2026-06-23T17:54:13.1256322Z    36 | #include <sys/syscall.h>
22470 │ 2026-06-23T17:54:13.1256881Z   +++ |+#include <string.h>
22471 │ 2026-06-23T17:54:13.1257280Z    37 | 
22472 │ 2026-06-23T17:54:13.1258958Z
../../../libgomp/config/linux/numa.c:80:42: error: ‘strncmp’ argument 3 type is
‘int’ where ‘unsigned int’ is expected in a call to bu
      │ ilt-in function declared without prototype
[-Werror=builtin-declaration-mismatch]
22473 │ 2026-06-23T17:54:13.1260693Z    80 |         if (strncmp ("node",
dp->d_name, 4 /* strlen ("node") */) == 0)
```

See https://github.com/Rust-GCC/gccrs/pull/4593

Reply via email to