From 9a845c17873cbdf49e8017d5f0af6d8f795589cc Mon Sep 17 00:00:00 2001
From: Luca Della Vedova <lucadv@intrinsic.ai>
Date: Mon, 23 Dec 2024 20:47:50 +0800
Subject: [PATCH] Bumb bindgen dependency to 0.70 (#452)

Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
---
 rclrs/Cargo.toml | 2 +-
 rclrs/build.rs   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rclrs/Cargo.toml b/rclrs/Cargo.toml
index fe17cc990..09f59cb62 100644
--- a/rclrs/Cargo.toml
+++ b/rclrs/Cargo.toml
@@ -43,7 +43,7 @@ tokio = { version = "*", features = ["rt", "time", "macros"] }
 
 [build-dependencies]
 # Needed for FFI
-bindgen = "0.66.1"
+bindgen = "0.70"
 # Needed for uploading documentation to docs.rs
 cfg-if = "1.0.0"
 
diff --git a/rclrs/build.rs b/rclrs/build.rs
index 91d0b190f..b6d88efce 100644
--- a/rclrs/build.rs
+++ b/rclrs/build.rs
@@ -57,7 +57,7 @@ fn main() {
         .default_enum_style(bindgen::EnumVariation::Rust {
             non_exhaustive: false,
         })
-        .parse_callbacks(Box::new(bindgen::CargoCallbacks));
+        .parse_callbacks(Box::new(bindgen::CargoCallbacks::new()));
 
     // Invalidate the built crate whenever this script or the wrapper changes
     println!("cargo:rerun-if-changed=build.rs");