Remove macro __linux__
Test: m netsim
Change-Id: I3df5c7a13141a672bf36a656880e7edc110adb03
diff --git a/src/netsim.cc b/src/netsim.cc
index 00e93ba..5b1f447 100644
--- a/src/netsim.cc
+++ b/src/netsim.cc
@@ -12,14 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <getopt.h>
-#if defined(__linux__)
#include <execinfo.h>
+#include <getopt.h>
#include <signal.h>
#include <unistd.h>
#include <cstdio>
-#endif
#include "core/server.h"
#ifdef NETSIM_ANDROID_EMULATOR
@@ -30,7 +28,6 @@
// Wireless network simulator for android (and other) emulated devices.
-#if defined(__linux__)
// Signal handler to print backtraces and then terminate the program.
void SignalHandler(int sig) {
size_t buffer_size = 20; // Number of entries in that array.
@@ -48,12 +45,14 @@
std::cerr << argv[0] << ": invalid option -- " << (char)c << "\n";
std::cerr << "Try `" << argv[0] << " --help' for more information.\n";
}
-#endif
int main(int argc, char *argv[]) {
#if defined(__linux__)
- signal(SIGSEGV, SignalHandler);
+ std::cout << "Testing: __linux__ is defined" << std::endl;
#endif
+
+ signal(SIGSEGV, SignalHandler);
+
const char *kShortOpt = "s:dg";
bool debug = false;
bool grpc_startup = false;