Skip to content
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

Fix build on OpenBSD, NetBSD and DragonflyBSD #769

Merged
merged 1 commit into from
Dec 23, 2023
Merged
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
3 changes: 3 additions & 0 deletions common/src/dcd/common/socket.d
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ version (OSX) version = haveUnixSockets;
version (linux) version = haveUnixSockets;
version (BSD) version = haveUnixSockets;
version (FreeBSD) version = haveUnixSockets;
version (OpenBSD) version = haveUnixSockets;
version (NetBSD) version = haveUnixSockets;
version (DragonflyBSD) version = haveUnixSockets;

enum DEFAULT_PORT_NUMBER = 9166;

Expand Down
12 changes: 8 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ LDC := ldc2
DPARSE_DIR := libdparse
DSYMBOL_DIR := dsymbol

SHELL:=/usr/bin/env bash

githash:
@mkdir -p bin
git describe --tags > bin/githash.txt
Expand All @@ -37,7 +35,6 @@ CLIENT_SRC := \
DMD_CLIENT_FLAGS := -Imsgpack-d/src\
-Imsgpack-d/src\
-Jbin\
-inline\
-O\
-wi\
-ofbin/dcd-client
Expand All @@ -56,6 +53,10 @@ LDC_CLIENT_FLAGS := -Imsgpack-d/src\
-oq\
-of=bin/dcd-client

ifneq ($(shell uname), OpenBSD)
override DMD_CLIENT_FLAGS += -inline
endif

override DMD_CLIENT_FLAGS += $(DFLAGS)
override LDC_CLIENT_FLAGS += $(DFLAGS)
override GDC_CLIENT_FLAGS += $(DFLAGS)
Expand All @@ -76,7 +77,6 @@ DMD_SERVER_FLAGS := -Icontainers/src\
-wi\
-O\
-release\
-inline\
-ofbin/dcd-server

DEBUG_SERVER_FLAGS := -Icontainers/src\
Expand Down Expand Up @@ -106,6 +106,10 @@ LDC_SERVER_FLAGS := -Icontainers/src\
-O5\
-release

ifneq ($(shell uname), OpenBSD)
DMD_SERVER_FLAGS += -inline
endif

override DMD_SERVER_FLAGS += $(DFLAGS)
override LDC_SERVER_FLAGS += $(DFLAGS)
override GDC_SERVER_FLAGS += $(DFLAGS)
Expand Down
3 changes: 3 additions & 0 deletions src/dcd/server/server.d
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ enum CONFIG_FILE_NAME = "dcd.conf";
version(linux) version = useXDG;
version(BSD) version = useXDG;
version(FreeBSD) version = useXDG;
version(OpenBSD) version = useXDG;
version(NetBSD) version = useXDG;
version(DragonflyBSD) version = useXDG;
version(OSX) version = useXDG;

/**
Expand Down
Loading