Implement extended attributes for FreeBSD, NetBSD, OpenBSD and DragonFly BSD.

This commit is contained in:
2021-03-31 00:10:49 +01:00
parent fc43f02250
commit f9ce3b60eb
7 changed files with 412 additions and 2 deletions

View File

@@ -22,8 +22,8 @@
# Copyright (C) 2011-2021 Natalia Portillo
# *****************************************************************************/
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
return()
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "^(([^k].*)?BSD|DragonFly)$" )
return()
endif()
include(CheckSymbolExists)

View File

@@ -28,6 +28,8 @@ Copyright (C) 2011-2021 Natalia Portillo
#include "../linux/linux.h"
#elif defined(__APPLE__) && defined(__MACH__)
#include "../darwin/darwin.h"
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include "../bsd/bsd.h"
#endif
void ExtendedAttributes(const char* path)
@@ -36,5 +38,7 @@ void ExtendedAttributes(const char* path)
LinuxExtendedAttributes(path);
#elif defined(__APPLE__) && defined(__MACH__)
DarwinExtendedAttributes(path);
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
BsdExtendedAttributes(path);
#endif
}