Skip to content

Commit f0afc36

Browse files
committed
Add CI job to build on Solaris
Add fmacros.h to enable strncasecmp in command.h Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
1 parent 1597493 commit f0afc36

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ jobs:
7474
gmake
7575
mkdir build && cd build && cmake .. && gmake
7676
77+
solaris:
78+
runs-on: ubuntu-latest
79+
name: Solaris
80+
steps:
81+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
82+
- name: Build in Solaris
83+
uses: vmactions/solaris-vm@58cbd70c6e051860f9b8f65908cc582938fbbdba # v1.1.5
84+
with:
85+
prepare: pkgutil -y -i gmake gcc5core openssl_utils
86+
run: |
87+
USE_TLS=1 gmake
88+
7789
build-cross:
7890
name: Cross-compile ${{ matrix.config.target }}
7991
runs-on: ubuntu-22.04

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ endif
184184

185185
ifeq ($(uname_S),FreeBSD)
186186
LDFLAGS += -lm
187-
else ifeq ($(UNAME_S),SunOS)
187+
else ifeq ($(uname_S),SunOS)
188188
ifeq ($(shell $(CC) -V 2>&1 | grep -iq 'sun\|studio' && echo true),true)
189189
SUN_SHARED_FLAG = -G
190190
else

src/command.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2929
* POSSIBILITY OF SUCH DAMAGE.
3030
*/
31+
#include "fmacros.h"
32+
3133
#include <assert.h>
3234
#include <ctype.h>
3335
#include <errno.h>

src/fmacros.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
#define VALKEY_FMACRO_H
33

44
#ifndef _AIX
5+
// Default: freebsd alloca missing
6+
7+
// Needed for FreeBSD cluster.c gettimeofday() random()
8+
// Needed for strdup in all linux builds
9+
#ifndef __FreeBSD__
510
#define _XOPEN_SOURCE 600
11+
#endif
12+
613
#define _POSIX_C_SOURCE 200112L
714
#endif
815

0 commit comments

Comments
 (0)