From c31d163e038e88a69bb8e1b02f3c7b8eb380aec8 Mon Sep 17 00:00:00 2001 From: danil_e71 Date: Thu, 11 Nov 2021 12:58:39 +0300 Subject: [PATCH 1/2] try fix build for 19.xx --- slurm-https.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/slurm-https.go b/slurm-https.go index 90ddd92..1c04418 100644 --- a/slurm-https.go +++ b/slurm-https.go @@ -20,6 +20,16 @@ size_t sluw_len_##T (T *l) { size_t i=0; if (l) while (l[i]!=S) i++; return i;} SLUW_LIST(uint32_t,0) SLUW_LIST(int32_t,-1) SLUW_LIST(chars,NULL) + +#if SLURM_VERSION_NUMBER < SLURM_VERSION_NUM(20,11,0) + typedef struct slurm_ctl_conf slurm_conf_t; +#endif + +int slurm_load_ctl_conf_wrapper(time_t update_time, + slurm_conf_t **slurm_ctl_conf_ptr) { + return slurm_load_ctl_conf(update_time, slurm_ctl_conf_ptr); +} + */ import ( "C" @@ -1121,7 +1131,7 @@ func load_ctl_conf(w http.ResponseWriter, r *http.Request) { obj.Run(w, r, func() { var slres *C.slurm_conf_t - ret := C.slurm_load_ctl_conf(opt.update_time, &slres) + ret := C.slurm_load_ctl_conf_wrapper(opt.update_time, &slres) if ret != 0 { slurm_error(w, r) From 55231c1e7cf234f66c798dd2376255b9e7b8c3ac Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 12 Nov 2021 16:53:01 +0300 Subject: [PATCH 2/2] Update slurm-https.go --- slurm-https.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/slurm-https.go b/slurm-https.go index 1c04418..827b520 100644 --- a/slurm-https.go +++ b/slurm-https.go @@ -24,12 +24,6 @@ SLUW_LIST(chars,NULL) #if SLURM_VERSION_NUMBER < SLURM_VERSION_NUM(20,11,0) typedef struct slurm_ctl_conf slurm_conf_t; #endif - -int slurm_load_ctl_conf_wrapper(time_t update_time, - slurm_conf_t **slurm_ctl_conf_ptr) { - return slurm_load_ctl_conf(update_time, slurm_ctl_conf_ptr); -} - */ import ( "C" @@ -1131,7 +1125,7 @@ func load_ctl_conf(w http.ResponseWriter, r *http.Request) { obj.Run(w, r, func() { var slres *C.slurm_conf_t - ret := C.slurm_load_ctl_conf_wrapper(opt.update_time, &slres) + ret := C.slurm_load_ctl_conf(opt.update_time, &slres) if ret != 0 { slurm_error(w, r)