Files
llvm-project/libc/hdr/sys_socket_macros.h
Alexey Samsonov 3fb55b6872 [libc] Add <sys/un.h> header. (#182622)
`sockaddr_un` structure is supposed to be provided by the `<sys/un.h>`
header. Add this header to llvm-libc, and move the declaration of
`sockaddr_un` there from `<sys/socket.h>`. See
https://man7.org/linux/man-pages/man0/sys_un.h.0p.html

Add proxy headers for the `<sys/socket.h>` macro (like `AF_UNIX`) and
for the `struct sockaddr_un` so that the tests can be more hermetic and
avoid system header inclusion.
2026-03-08 06:22:36 +00:00

23 lines
660 B
C

//===-- Definition of macros from sys/socket.h ----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_HDR_SYS_SOCKET_MACROS_H
#define LLVM_LIBC_HDR_SYS_SOCKET_MACROS_H
#ifdef LIBC_FULL_BUILD
#include "include/llvm-libc-macros/sys-socket-macros.h"
#else // Overlay mode
#include <sys/socket.h>
#endif // LLVM_LIBC_FULL_BUILD
#endif // LLVM_LIBC_HDR_SYS_SOCKET_MACROS_H