File: fix-32bit-build.diff

package info (click to toggle)
rust-zmq-sys 0.11.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240 kB
  • sloc: makefile: 4
file content (72 lines) | stat: -rw-r--r-- 2,193 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Index: rust-zmq-sys-0.11.0/src/ffi.rs
===================================================================
--- rust-zmq-sys-0.11.0.orig/src/ffi.rs
+++ rust-zmq-sys-0.11.0/src/ffi.rs
@@ -415,6 +415,7 @@ pub struct zmq_pollitem_t {
     pub revents: ::std::os::raw::c_short,
 }
 #[test]
+#[cfg(target_pointer_width = "64")]
 fn bindgen_test_layout_zmq_pollitem_t() {
     assert_eq!(
         ::std::mem::size_of::<zmq_pollitem_t>(),
@@ -462,6 +463,59 @@ fn bindgen_test_layout_zmq_pollitem_t()
         concat!(
             "Offset of field: ",
             stringify!(zmq_pollitem_t),
+            "::",
+            stringify!(revents)
+        )
+    );
+}
+#[cfg(not(target_pointer_width = "64"))]
+fn bindgen_test_layout_zmq_pollitem_t() {
+    assert_eq!(
+        ::std::mem::size_of::<zmq_pollitem_t>(),
+        12usize,
+        concat!("Size of: ", stringify!(zmq_pollitem_t))
+    );
+    assert_eq!(
+        ::std::mem::align_of::<zmq_pollitem_t>(),
+        4usize,
+        concat!("Alignment of ", stringify!(zmq_pollitem_t))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<zmq_pollitem_t>())).socket as *const _ as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(zmq_pollitem_t),
+            "::",
+            stringify!(socket)
+        )
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<zmq_pollitem_t>())).fd as *const _ as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(zmq_pollitem_t),
+            "::",
+            stringify!(fd)
+        )
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<zmq_pollitem_t>())).events as *const _ as usize },
+        8usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(zmq_pollitem_t),
+            "::",
+            stringify!(events)
+        )
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<zmq_pollitem_t>())).revents as *const _ as usize },
+        10usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(zmq_pollitem_t),
             "::",
             stringify!(revents)
         )