The branch stable/14 has been updated by dim:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4ff445d3723a58ef8a5d34e4e33c4f40d217e1ab

commit 4ff445d3723a58ef8a5d34e4e33c4f40d217e1ab
Author:     Warner Losh <[email protected]>
AuthorDate: 2024-10-15 19:49:53 +0000
Commit:     Dimitry Andric <[email protected]>
CommitDate: 2025-12-29 21:48:19 +0000

    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)
---
 sys/compat/linuxkpi/common/include/linux/compiler.h | 2 ++
 sys/sys/cdefs.h                                     | 1 +
 2 files changed, 3 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h 
b/sys/compat/linuxkpi/common/include/linux/compiler.h
index c82b9acd53fb..fb5ad3bf4fe4 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 ed759029a53f..fc0a6c2f294c 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -214,6 +214,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)))

Reply via email to