Skip to content

Commit

Permalink
Merge pull request #153 from grondo/issue#152
Browse files Browse the repository at this point in the history
fix compile of slurm plugin against Slurm >= 23.x
  • Loading branch information
garlick authored Oct 9, 2023
2 parents 3bc95a8 + d63bab3 commit d325977
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
Expand All @@ -17,19 +17,19 @@ jobs:
name: ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: install dependencies
run: sudo apt install libgenders0-dev
run: sudo apt install libgenders0-dev libslurm-dev
- name: fix permissions
run: chmod -R o-w /home/runner || true
- name: configure
run: >
./bootstrap &&
./configure --with-ssh --with-exec --with-netgroup
--with-dshgroups --with-genders --with-machines
--with-dshgroups --with-genders --with-machines --with-slurm
- name: make
run: make -j 2 CFLAGS="-Werror"
- name: make check
Expand All @@ -39,7 +39,7 @@ jobs:
name: macos
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
Expand All @@ -59,7 +59,7 @@ jobs:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
Expand All @@ -76,4 +76,4 @@ jobs:
- name: make check-code-coverage
run: make check-code-coverage
- name: coverage report
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
10 changes: 10 additions & 0 deletions src/modules/slurm.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@
* with our internal List datatype.
*/
#define __list_datatypes_defined 1
/*
* Also, Slurm>=23.x requires that `struct xlist` be typedef'd to list_t:
*/
typedef struct xlist list_t;
typedef struct listIterator list_itr_t;
/*
* Also, Slurm exports the hostlist_t interface as well:
*/
#define __hostlist_t_defined 1

#include <slurm/slurm.h>
#include <slurm/slurm_errno.h>

Expand Down

0 comments on commit d325977

Please sign in to comment.