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: do not rely on luaconf.h to include limits.h #39

Merged
merged 3 commits into from
Dec 18, 2024
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
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,14 @@ jobs:
with:
luarocksVersion: "3.11.0"

- name: dependencies
run: |
luarocks install busted

- name: install
run: |
luarocks remove --force luasystem
luarocks make

- name: test dependencies
run: |
luarocks install busted

- name: test
run: |
busted --exclude-tags=manual --Xoutput "--color"
8 changes: 6 additions & 2 deletions src/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

#include <lua.h>
#include <lauxlib.h>
#include <limits.h>

#ifdef _WIN32
#include <float.h>
#include <limits.h>
#include <windows.h>
#else
#include <time.h>
Expand All @@ -22,7 +22,11 @@
#define MAC_OS_X_VERSION_10_12 101200
#endif

#define HAVE_CLOCK_GETTIME (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 || defined(CLOCK_MONOTONIC))
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 || defined(CLOCK_MONOTONIC))
#define HAVE_CLOCK_GETTIME 1
#else
#define HAVE_CLOCK_GETTIME 0
#endif

#if !(HAVE_CLOCK_GETTIME)
#include "time_osx.h"
Expand Down
Loading