Fix platform_posix.cc on FreeBSD

This commit is contained in:
Fangrui Song 2017-12-29 14:46:21 -08:00
parent 66d4926e41
commit b015b03405

View File

@ -3,12 +3,15 @@
#include "utils.h"
#include <loguru.hpp>
#include "loguru.hpp"
#include <pthread.h>
#include <cassert>
#include <iostream>
#include <string>
#if defined(__FreeBSD__)
# include <pthread_np.h>
# include <sys/thr.h>
#elif defined(__OpenBSD__)
# include <pthread_np.h>
#endif
#include <assert.h>
#include <errno.h>
@ -27,7 +30,6 @@
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <semaphore.h>
#include <sys/mman.h>
@ -39,6 +41,9 @@
#include <malloc.h>
#endif
#include <iostream>
#include <string>
namespace {
// Returns the canonicalized absolute pathname, without expanding symbolic