{"action":"created","issue":{"url":"https://api.github.com/repos/nix-rust/nix/issues/218","repository_url":"https://api.github.com/repos/nix-rust/nix","labels_url":"https://api.github.com/repos/nix-rust/nix/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/nix-rust/nix/issues/218/comments","events_url":"https://api.github.com/repos/nix-rust/nix/issues/218/events","html_url":"https://github.com/nix-rust/nix/issues/218","id":123278128,"number":218,"title":"bARMy types error","user":{"login":"petevine","id":12054457,"avatar_url":"https://avatars.githubusercontent.com/u/12054457?v=3","gravatar_id":"","url":"https://api.github.com/users/petevine","html_url":"https://github.com/petevine","followers_url":"https://api.github.com/users/petevine/followers","following_url":"https://api.github.com/users/petevine/following{/other_user}","gists_url":"https://api.github.com/users/petevine/gists{/gist_id}","starred_url":"https://api.github.com/users/petevine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petevine/subscriptions","organizations_url":"https://api.github.com/users/petevine/orgs","repos_url":"https://api.github.com/users/petevine/repos","events_url":"https://api.github.com/users/petevine/events{/privacy}","received_events_url":"https://api.github.com/users/petevine/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-21T13:16:42Z","updated_at":"2016-03-01T16:18:49Z","closed_at":"2016-02-13T00:33:43Z","body":"This [breakage](https://github.com/rust-lang/rust/issues/29867) is responsible for errors like these on ARM Linux:\r\n\r\n````\r\nCompiling nix v0.3.9\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/fcntl.rs:102:28: 102:41 error: mismatched types:\r\n expected `*const i8`,\r\n    found `*const u8`\r\n(expected i8,\r\n    found u8) [E0308]\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/fcntl.rs:102         unsafe { ffi::open(cstr.as_ptr(), oflag.bits(), mode.bits() as mode_t) }\r\n                                                                                                               ^~~~~~~~~~~~~\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/fcntl.rs:101:14: 103:8 note: in this expansion of try! (defined in <std macros>)\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/fcntl.rs:102:28: 102:41 help: run `rustc --explain E0308` to see a detailed explanation\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:105:30: 105:43 error: mismatched types:\r\n expected `*const i8`,\r\n    found `*const u8`\r\n(expected i8,\r\n    found u8) [E0308]\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:105         unsafe { ffi::umount(cstr.as_ptr()) }\r\n                                                                                                                 ^~~~~~~~~~~~~\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:104:15: 106:8 note: in this expansion of try! (defined in <std macros>)\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:105:30: 105:43 help: run `rustc --explain E0308` to see a detailed explanation\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:113:31: 113:44 error: mismatched types:\r\n expected `*const i8`,\r\n    found `*const u8`\r\n(expected i8,\r\n    found u8) [E0308]\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:113         unsafe { ffi::umount2(cstr.as_ptr(), flags.bits) }\r\n                                                                                                                  ^~~~~~~~~~~~~\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:112:15: 114:8 note: in this expansion of try! (defined in <std macros>)\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:113:31: 113:44 help: run `rustc --explain E0308` to see a detailed explanation\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:80:37: 80:50 error: mismatched types:\r\n expected `*const i8`,\r\n    found `*const u8`\r\n(expected i8,\r\n    found u8) [E0308]\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:80     let res = unsafe { ffi::mq_open(name.as_ptr(), oflag.bits(), mode.bits() as mode_t, attr as *const MqAttr) };\r\n                                                                                                                        ^~~~~~~~~~~~~\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:80:37: 80:50 help: run `rustc --explain E0308` to see a detailed explanation\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:90:39: 90:52 error: mismatched types:\r\n expected `*const i8`,\r\n    found `*const u8`\r\n(expected i8,\r\n    found u8) [E0308]\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:90     let res = unsafe { ffi::mq_unlink(name.as_ptr()) };\r\n                                                                                                                          ^~~~~~~~~~~~~\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:90:39: 90:52 help: run `rustc --explain E0308` to see a detailed explanation\r\n   Compiling env_logger v0.3.2\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:112:31: 112:47 error: mismatched types:\r\n expected `*const i8`,\r\n    found `*const u8`\r\n(expected i8,\r\n    found u8) [E0308]\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:112     let len = unsafe { strlen(message.as_ptr()) as size_t };\r\n                                                                                                                   ^~~~~~~~~~~~~~~~\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:112:31: 112:47 help: run `rustc --explain E0308` to see a detailed explanation\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:113:44: 113:60 error: mismatched types:\r\n expected `*const i8`,\r\n    found `*const u8`\r\n(expected i8,\r\n    found u8) [E0308]\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:113     let res = unsafe { ffi::mq_send(mqdes, message.as_ptr(), len, msq_prio) };\r\n                                                                                                                                ^~~~~~~~~~~~~~~~\r\n/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:113:44: 113:60 help: run `rustc --explain E0308` to see a detailed explanation\r\n/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/nix-0.3.9/src/fcntl.rs:74:28: 74:41 error: mismatched types:\r\n expected `*const i8`,\r\n    found `*const u8`\r\n(expected i8,\r\n    found u8) [E0308]\r\n\r\n````\r\n\r\nIn most cases they can be fixed by simple casts `as *const _`"},"comment":{"url":"https://api.github.com/repos/nix-rust/nix/issues/comments/190790781","html_url":"https://github.com/nix-rust/nix/issues/218#issuecomment-190790781","issue_url":"https://api.github.com/repos/nix-rust/nix/issues/218","id":190790781,"user":{"login":"kamalmarhubi","id":50936,"avatar_url":"https://avatars.githubusercontent.com/u/50936?v=3","gravatar_id":"","url":"https://api.github.com/users/kamalmarhubi","html_url":"https://github.com/kamalmarhubi","followers_url":"https://api.github.com/users/kamalmarhubi/followers","following_url":"https://api.github.com/users/kamalmarhubi/following{/other_user}","gists_url":"https://api.github.com/users/kamalmarhubi/gists{/gist_id}","starred_url":"https://api.github.com/users/kamalmarhubi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamalmarhubi/subscriptions","organizations_url":"https://api.github.com/users/kamalmarhubi/orgs","repos_url":"https://api.github.com/users/kamalmarhubi/repos","events_url":"https://api.github.com/users/kamalmarhubi/events{/privacy}","received_events_url":"https://api.github.com/users/kamalmarhubi/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T16:18:49Z","updated_at":"2016-03-01T16:18:49Z","body":"The latest master is using 0.2.6, but the latest release is still on 0.1.x as you noticed. We're figuring out how to make a release this week, so hopefully there will soon be a 0.5.0 that uses libc 0.2.x, and includes the ARM fixes."}}