diff options
| author | Warner Losh <imp@FreeBSD.org> | 2024-10-15 13:49:53 -0600 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2025-12-30 00:46:49 +0100 |
| commit | 9622eff37fbd62b2c5227c959973c565dbf774e6 (patch) | |
| tree | 03f433faaceb375b7725098106c54580e13a221b | |
| parent | cd2a65a60701d806e8ebbf97b6c77c880e0c9746 (diff) | |
cdefs: Add __deprecated
Add __deprecated decorator. This is for a deprecated interface. copystr
is tagged with this today in copy(9), but don't actually provide it or
use it. copystr is a #define so adding it will have to wait.
LinuxKPI was defining this away completely in compiler.h. Since this is
shared between Linux KPI consumers and OpenZFS, if it's already defined,
use the FreeBSD sys/cdefs.h version, otherwise define it away. For
OpenZFS this will retain it, while for Linux KPI it will tend to drop it
(I think always, but I didn't look at everything).
Sponsored by: Netflix
Reviewed by: jhb, emaste
Differential Revision: https://reviews.freebsd.org/D46137
(cherry picked from commit 16672453f12586703f1c51d909bd1900691bf884)
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/compiler.h | 2 | ||||
| -rw-r--r-- | sys/sys/cdefs.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 94595b2e8c50..c5a88dc2efa4 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -48,7 +48,9 @@ #define __cond_lock(x,c) (c) #define __bitwise #define __devinitdata +#ifndef __deprecated #define __deprecated +#endif #define __init #define __initconst #define __devinit diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 96a3742c4a1d..9ba91054e923 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -215,6 +215,7 @@ #define __pure2 __attribute__((__const__)) #define __unused __attribute__((__unused__)) #define __used __attribute__((__used__)) +#define __deprecated __attribute__((__deprecated__)) #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) |
