mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-03 23:15:52 +00:00
7caa87862e
All #ifndef guards on headers have been removed, I think, in favor of #pragma once Headers are now included as `#include "filename"` if the included file resides in the same directory as the file including it, or any subdirectory therein. Otherwise they are included as `#include <project/top/dir/relative/path/filename>` The above does not include system/os headers.
23 lines
444 B
C++
23 lines
444 B
C++
#pragma once
|
|
#ifndef _WIN32
|
|
// this file is a shim include for #include <net/if.h>
|
|
#if defined(__linux__)
|
|
#include <linux/if.h>
|
|
extern "C" unsigned int
|
|
#ifndef __GLIBC__
|
|
if_nametoindex(const char* __ifname);
|
|
#else
|
|
if_nametoindex(const char* __ifname) __THROW;
|
|
#endif
|
|
#else
|
|
#include <net/if.h>
|
|
#endif
|
|
#endif
|
|
|
|
namespace llarp::net
|
|
{
|
|
/// get the name of the loopback interface
|
|
std::string
|
|
LoopbackInterfaceName();
|
|
} // namespace llarp::net
|