<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fortify-headers/include, branch experimental</title>
<subtitle>Standalone portable header-based implementation of FORTIFY_SOURCE=3 
</subtitle>
<id>http://git.dustri.org/fortify-headers/atom?h=experimental</id>
<link rel='self' href='http://git.dustri.org/fortify-headers/atom?h=experimental'/>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/'/>
<updated>2025-10-28T22:18:21Z</updated>
<entry>
<title>Add a missing FORTIFY_PEDANTIC_CHECKS</title>
<updated>2025-10-28T22:18:21Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T22:18:21Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=ede3643ed290bc6b7764d6add93e76899f7629b2'/>
<id>urn:sha1:ede3643ed290bc6b7764d6add93e76899f7629b2</id>
<content type='text'>
Fixing the following issue:

```
In file included from xstrndup.c:34:
/OpenWrt/aarch64/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/include/fortify/string.h: In function 'mempcpy':
/OpenWrt/aarch64/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/include/fortify/string.h:340:13: error: 'nonnull' argument '__d' compared to NULL [-Werror=nonnull-compare]
  340 |         if (!__d || !__s)
      |             ^~~~
/OpenWrt/aarch64/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/include/fortify/string.h:340:21: error: 'nonnull' argument '__s' compared to NULL [-Werror=nonnull-compare]
  340 |         if (!__d || !__s)
      |                     ^~~~
cc1: all warnings being treated as errors
make[5]: *** [Makefile:511: xstrndup.o] Error 1
```

Reported in https://github.com/openwrt/openwrt/pull/20552
</content>
</entry>
<entry>
<title>Fix possible cast-mismatch spotted by `-Werror=cast-qual`</title>
<updated>2025-10-28T22:16:05Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T22:16:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=05baf9cfe90c25b02652489c6dd75810600ead5e'/>
<id>urn:sha1:05baf9cfe90c25b02652489c6dd75810600ead5e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use C90-compliant comments</title>
<updated>2025-10-28T22:13:42Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T22:13:42Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=8a43ce98138d363b6595a16b98b6016c5e306191'/>
<id>urn:sha1:8a43ce98138d363b6595a16b98b6016c5e306191</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fortify-headers: Remove __fh_has_builtin()</title>
<updated>2025-10-28T19:09:50Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2025-10-26T22:16:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=4b6225cf322adf3e47425156e00a844b2f08e221'/>
<id>urn:sha1:4b6225cf322adf3e47425156e00a844b2f08e221</id>
<content type='text'>
GCC complains about the `defined` usage here. Just call `__has_builtin` directly.

This fixes the following compile error when compiling strace:
```
In file included from /home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/stdlib.h:27,
                 from number_set.c:14:
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
   26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
      |                              ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:28:7: note: in expansion of macro '__fh_has_builtin'
   28 | #if ! __fh_has_builtin(__builtin_trap)
      |       ^~~~~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
   26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
      |                              ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:73:29: note: in expansion of macro '__fh_has_builtin'
   73 | #if _FORTIFY_SOURCE  &gt; 2 &amp;&amp; __fh_has_builtin (__builtin_dynamic_object_size)
      |                             ^~~~~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
   26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
      |                              ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:158:5: note: in expansion of macro '__fh_has_builtin'
  158 | #if __fh_has_builtin (__builtin_mul_overflow_p)
      |     ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>Check if FORTIFY_USE_NATIVE_CHK is defined</title>
<updated>2025-10-28T17:12:50Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2025-10-26T16:38:41Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=7027b39b4de8ba361efce499472008e21ee29f86'/>
<id>urn:sha1:7027b39b4de8ba361efce499472008e21ee29f86</id>
<content type='text'>
The previews code tried to get the value defined for
FORTIFY_USE_NATIVE_CHK and this resulted in some build errors like
this:
```
/include/fortify/stdio.h: In function 'vsnprintf':
/include/fortify/stdio.h:155:49: error: "FORTIFY_USE_NATIVE_CHK" is not defined, evaluates to 0 [-Werror=undef]
  155 | #if __has_builtin(__builtin___vsnprintf_chk) &amp;&amp; FORTIFY_USE_NATIVE_CHK
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~
```

Check if it is defined instead.

Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>poll: Check if _REDIR_TIME64 is defined</title>
<updated>2025-10-28T17:12:42Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2025-10-26T22:15:30Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=0161df05d7d647e478de22153722665713b376c9'/>
<id>urn:sha1:0161df05d7d647e478de22153722665713b376c9</id>
<content type='text'>
Treat _REDIR_TIME64 being undefined like being set to 0.

This fixes the following compile error in strace:
```
In file included from pathtrace.c:12:
/include/fortify/poll.h:46:30: error: "_REDIR_TIME64" is not defined, evaluates to 0 [-Werror=undef]
   46 | #if defined(_GNU_SOURCE) &amp;&amp; !_REDIR_TIME64
      |                              ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>Add `swab`</title>
<updated>2025-10-12T12:47:11Z</updated>
<author>
<name>Sertonix</name>
</author>
<published>2025-10-11T16:25:20Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=41d3081c4ac0a79a4ad292957ead84f8477eaa55'/>
<id>urn:sha1:41d3081c4ac0a79a4ad292957ead84f8477eaa55</id>
<content type='text'>
Make the overlap check pedantic only since some software seems to rely
on glibc working when src and dest are the same.
</content>
</entry>
<entry>
<title>Bump actions/upload-pages-artifact from v1 to v3</title>
<updated>2025-05-12T16:52:20Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-05-12T16:52:20Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=2c17bdbd255e75f48753a1429589b3a17cde872a'/>
<id>urn:sha1:2c17bdbd255e75f48753a1429589b3a17cde872a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix a compilation error on C99</title>
<updated>2025-01-28T12:18:31Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-01-28T11:52:23Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=f09abdf6e236198e6dbf7d049dc99534d9f8af01'/>
<id>urn:sha1:f09abdf6e236198e6dbf7d049dc99534d9f8af01</id>
<content type='text'>
Add some ifdef guards around `getlogin_r`.
</content>
</entry>
<entry>
<title>Neuter an issue in strncat</title>
<updated>2024-10-21T13:04:50Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-10-21T13:04:50Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=dcdd2f1fb065b6e98d87ab7b367e8fb483f9b59c'/>
<id>urn:sha1:dcdd2f1fb065b6e98d87ab7b367e8fb483f9b59c</id>
<content type='text'>
`strlen(src)` isn't guaranteed to be valid.
</content>
</entry>
</feed>
