Add simple header wrapper that provides sockaddr_un.
This commit is contained in:
parent
de359ea408
commit
5dd6a2cb14
1 changed files with 26 additions and 0 deletions
26
src/unixdef.h
Normal file
26
src/unixdef.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
#ifndef UNIXDEF_H
|
||||
#define UNIXDEF_H
|
||||
/*=========================================================================*\
|
||||
* Unix domain defines
|
||||
* LuaSocket toolkit
|
||||
*
|
||||
* Provides sockaddr_un on Windows and Unix.
|
||||
\*=========================================================================*/
|
||||
|
||||
#ifdef _WIN32
|
||||
/* Technically it's possible to include <afunix.h> but it's only available
|
||||
on Windows SDK 17134 (Windows 10 1803). */
|
||||
#ifndef AF_UNIX
|
||||
#define AF_UNIX 1
|
||||
#endif
|
||||
|
||||
struct sockaddr_un
|
||||
{
|
||||
unsigned short sun_family;
|
||||
char sun_path[108];
|
||||
};
|
||||
#else
|
||||
#include <sys/un.h>
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#endif /* UNIXDEF_H */
|
Loading…
Add table
Reference in a new issue