`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.
23 lines
660 B
C
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
|