mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-10-04 10:03:38 +00:00
rust: Make it work on FreeBSD
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
parent
f34052d78e
commit
846f3d13c6
@ -37,10 +37,10 @@ RUST_BUILT_SRCS = \
|
||||
src/sys/cmap.rs
|
||||
|
||||
src/sys/cpg.rs: ../../include/corosync/cpg.h
|
||||
$(top_srcdir)/build-aux/rust-regen.sh $^ $@ CPG -- -I$(top_srcdir)/include
|
||||
$(top_srcdir)/build-aux/rust-regen.sh $^ $@ CPG --blocklist-function=inet6.* --blocklist-function==.*etsourcefilter -- -I$(top_srcdir)/include
|
||||
|
||||
src/sys/cfg.rs: ../../include/corosync/cfg.h
|
||||
$(top_srcdir)/build-aux/rust-regen.sh $^ $@ CFG -- -I$(top_srcdir)/include
|
||||
$(top_srcdir)/build-aux/rust-regen.sh $^ $@ CFG --blocklist-function=inet6.* --blocklist-function=.*etsourcefilter -- -I$(top_srcdir)/include
|
||||
|
||||
src/sys/quorum.rs: ../../include/corosync/quorum.h
|
||||
$(top_srcdir)/build-aux/rust-regen.sh $^ $@ QUORUM -- -I$(top_srcdir)/include
|
||||
@ -49,7 +49,7 @@ src/sys/votequorum.rs: ../../include/corosync/votequorum.h
|
||||
$(top_srcdir)/build-aux/rust-regen.sh $^ $@ VOTEQUORUM -- -I$(top_srcdir)/include
|
||||
|
||||
src/sys/cmap.rs: ../../include/corosync/cmap.h
|
||||
$(top_srcdir)/build-aux/rust-regen.sh $^ $@ CMAP -- -I$(top_srcdir)/include
|
||||
$(top_srcdir)/build-aux/rust-regen.sh $^ $@ CMAP -- -I$(top_srcdir)/include $(LIBQB_CFLAGS)
|
||||
|
||||
all-local: cargo-tree-prep target/$(RUST_TARGET_DIR)/cpg.rlib \
|
||||
target/$(RUST_TARGET_DIR)/cfg.rlib \
|
||||
|
@ -11,6 +11,7 @@ fn main() {
|
||||
// Tell the compiler to use the build-tree libs & headers for compiling
|
||||
println!("cargo:rustc-link-search=native=../../../lib/.libs/");
|
||||
println!("cargo:rustc-link-search=native=../../../common_lib/.libs/");
|
||||
println!("cargo:rustc-flags=@LIBQBLIBS@");
|
||||
println!("cargo:rustc-link-lib=cpg");
|
||||
println!("cargo:rustc-link-lib=cfg");
|
||||
println!("cargo:rustc-link-lib=cmap");
|
||||
|
@ -18,7 +18,6 @@ shift; shift; shift
|
||||
|
||||
bindgen \
|
||||
--size_t-is-usize \
|
||||
--no-recursive-allowlist \
|
||||
--no-prepend-enum-name \
|
||||
--no-layout-tests \
|
||||
--no-doc-comments \
|
||||
|
@ -22,6 +22,7 @@ build.rs: build.rs.in
|
||||
cat $^ | sed \
|
||||
-e 's#@ABSTOPLEVELSRC@#$(abs_top_srcdir)#g' \
|
||||
-e 's#@ABSTOPLEVELBUILD@#$(abs_top_builddir)#g' \
|
||||
-e 's#@LIBQBLIBS@#$(LIBQB_LIBS)#g' \
|
||||
> $@-t
|
||||
chmod a-w $@-t
|
||||
mv $@-t $@
|
||||
|
@ -36,6 +36,7 @@
|
||||
#define COROSYNC_CPG_H_DEFINED
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <corosync/corotypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
Reference in New Issue
Block a user