zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit feaa690dc6673073039e81c9e5d43d2a65224cfa (tree)
parent 3b515fbede945a2927d5aba59212553a8b26b944
Author: Huang Zhichao <hahv@msn.com>
Date:   Wed, 11 Mar 2026 15:49:21 +0800

FreeBSD libc: prevent ssp headers from being included before FreeBSD 15

Diffstat:
Mlib/libc/include/generic-freebsd/ssp/poll.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/random.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/signal.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/socket.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/ssp.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/stdio.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/stdlib.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/string.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/strings.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/uio.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/unistd.h | 6++++++
Mlib/libc/include/generic-freebsd/ssp/wchar.h | 6++++++
12 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/lib/libc/include/generic-freebsd/ssp/poll.h b/lib/libc/include/generic-freebsd/ssp/poll.h @@ -24,6 +24,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/poll.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/poll.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_POLL_H_ #define _SSP_POLL_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/random.h b/lib/libc/include/generic-freebsd/ssp/random.h @@ -24,6 +24,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/random.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/random.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_RANDOM_H_ #define _SSP_RANDOM_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/signal.h b/lib/libc/include/generic-freebsd/ssp/signal.h @@ -24,6 +24,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/signal.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/signal.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_SIGNAL_H_ #define _SSP_SIGNAL_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/socket.h b/lib/libc/include/generic-freebsd/ssp/socket.h @@ -24,6 +24,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/socket.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/socket.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_SOCKET_H_ #define _SSP_SOCKET_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/ssp.h b/lib/libc/include/generic-freebsd/ssp/ssp.h @@ -31,6 +31,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/ssp.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/ssp.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_SSP_H_ #define _SSP_SSP_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/stdio.h b/lib/libc/include/generic-freebsd/ssp/stdio.h @@ -31,6 +31,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/stdio.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/stdio.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_STDIO_H_ #define _SSP_STDIO_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/stdlib.h b/lib/libc/include/generic-freebsd/ssp/stdlib.h @@ -24,6 +24,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/stdlib.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/stdlib.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_STDLIB_H_ #define _SSP_STDLIB_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/string.h b/lib/libc/include/generic-freebsd/ssp/string.h @@ -31,6 +31,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/string.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/string.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_STRING_H_ #define _SSP_STRING_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/strings.h b/lib/libc/include/generic-freebsd/ssp/strings.h @@ -31,6 +31,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/strings.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/strings.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_STRINGS_H_ #define _SSP_STRINGS_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/uio.h b/lib/libc/include/generic-freebsd/ssp/uio.h @@ -24,6 +24,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/uio.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/uio.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_UIO_H_ #define _SSP_UIO_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/unistd.h b/lib/libc/include/generic-freebsd/ssp/unistd.h @@ -31,6 +31,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/unistd.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/unistd.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_UNISTD_H_ #define _SSP_UNISTD_H_ diff --git a/lib/libc/include/generic-freebsd/ssp/wchar.h b/lib/libc/include/generic-freebsd/ssp/wchar.h @@ -24,6 +24,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +// zig patch: ssp/wchar.h header was added in FreeBSD 15 +#if __FreeBSD_version < 1500500 + #error "ssp/wchar.h did not exist before FreeBSD 15" +#endif /* error for FreeBSD before 15 */ + #ifndef _SSP_WCHAR_H_ #define _SSP_WCHAR_H_