[PATCH 8/9] misc: Add __BEGIN_DECLS/__END_DECLS to generic sys/swap.h
Carlos O'Donell
carlos@redhat.com
Mon Nov 2 17:00:52 GMT 2026
On 10/21/26 9:54 AM, Adhemerval Zanella wrote:
> The swapon and swapoff prototypes have C++ language linkage when the
> generic <sys/swap.h>, used by Hurd, is included from C++.
>
> Checked with the misc installed-header tests on i686-gnu.
LGTM.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> ---
> sysdeps/generic/sys/swap.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/sysdeps/generic/sys/swap.h b/sysdeps/generic/sys/swap.h
> index fa35dac960b..2b51eb35275 100644
> --- a/sysdeps/generic/sys/swap.h
> +++ b/sysdeps/generic/sys/swap.h
> @@ -21,6 +21,7 @@
> #define __SYS_SWAP_H 1
> #include <features.h>
>
> +__BEGIN_DECLS
>
> /* Make the block special device PATH available to the system for swapping.
> This call is restricted to the super-user. */
> @@ -29,4 +30,6 @@ extern int swapon (const char *__path, int __flags) __THROW;
> /* Stop using block special device PATH for swapping. */
> extern int swapoff (const char *__path) __THROW;
>
> +__END_DECLS
> +
> #endif /* sys/swap.h */
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list