Skip to content

OpenBSD, Clang compatibility changes #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ include(CMakeModules/git_info.cmake)
include(CMakeModules/install_dirs.cmake)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include_directories(/usr/local/include)

# Include custom FindXXX modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules")
Expand Down
4 changes: 2 additions & 2 deletions include/libfds/converters.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ extern "C" {
#endif

// Check the size of double and float, this MUST be here!!!
static_assert(sizeof(double) == sizeof(uint64_t), "Double is not 8 bytes long!");
static_assert(sizeof(float) == sizeof(uint32_t), "Float is not 4 bytes long!");
_Static_assert(sizeof(double) == sizeof(uint64_t), "Double is not 8 bytes long!");
_Static_assert(sizeof(float) == sizeof(uint32_t), "Float is not 4 bytes long!");

/**
* \def FDS_CONVERT_EPOCHS_DIFF
Expand Down
3 changes: 3 additions & 0 deletions src/converters/converters.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
#include <stdio.h> // snprintf
#include <inttypes.h> // PRIi64, PRIu32,...
#include <math.h> // isnormal
#ifdef __OpenBSD__
#include <sys/socket.h>
#endif
#include "branchlut2.h"

int
Expand Down
1 change: 1 addition & 0 deletions src/file/File_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <endian.h>
#include <algorithm>
#include <cerrno>

#include <sys/types.h> // lseek
#include <unistd.h> // lseek, lockf
Expand Down
4 changes: 4 additions & 0 deletions src/file/Io_async.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
#ifndef LIBFDS_IO_ASYNC_HPP
#define LIBFDS_IO_ASYNC_HPP

#ifdef __OpenBSD__
#include <aio_compat.h>
#else
#include <aio.h>
#endif
#include <memory>
#include "Io_request.hpp"

Expand Down