Skip to content
Snippets Groups Projects
  1. Nov 20, 2019
  2. Nov 19, 2019
  3. Nov 18, 2019
    • bors's avatar
      Auto merge of #1555 - flocknetworks:ip_mreqn, r=gnzlbg · e9f63399
      bors authored
      Add struct ip_mreqn: ip multicast req with intf id
      
      The ip_mreqn struct has an additional interface id parameter. This
      allows programming IPv4 multicast groups using the interface id
      alongside the src IPv4 address.
      Linux has supported the ip_mreqn struct since Linux 2.2
      ref: man ip.7
      e9f63399
    • bors's avatar
      Auto merge of #1539 - gluxon:master, r=gnzlbg · 64a146e0
      bors authored
      Add extended IFLA_ consts
      
      Only Netlink interface link attributes up `IFLA_STATS` are currently available. This commit adds `IFLA_COST` to `IFLA_MAX_MTU`.
      
      See https://github.com/torvalds/linux/blob/54ecb8f7/include/uapi/linux/if_link.h#L106
      
      Thanks!
      64a146e0
    • bors's avatar
      Auto merge of #1536 - Aaron1011:feature/const-fn, r=gnzlbg · d742eedf
      bors authored
      Add support for making functions `const`
      
      PR https://github.com/rust-lang/rust/pull/64906 adds the ability to write `const extern fn` and `const unsafe extern fn`, which will allow manys functions in `libc` to become `const`.
      
      This is particuarly useful for functions which correspond to C macros (e.g. `CMSG_SPACE`). In C, these macros are constant expressions, allowing them to be used when declaring arrays. However, since the corresponding `libc` functions are not `const`, writing equivalent Rust code is impossible. Users must either perform an unecessary heap allocation, or pull in `bindgen` to evaluate the macro for specific values (e.g. `CMSG_SPACE(1)`).
      
      However, the syntax `const extern fn` is not currently parsed by rust. To allow libc to use this without breaking backwards compatibility (i.e. bumping the minimum Rust version), I've taken the following approach:
      
      1. A new off-by-default feature `extern-const-fn` is added to `libc`.
      2. The internal `f!` macro has two versions, selected at compile-time by a `cfg_if`. When `extern-const-fn` is enabled, the declared `f!` macro passes through the `const` keyword from the macro user to the final definition (`pub const unsafe extern fn foo`. When  `extern-const-fn` is disabled, the `const` keyword passed by the macro user is discarded, resulting in a plain `pub extern const fn` being declared.
      
      Unfortunately, I couldn't manage to get `macro_rules` to accept a normal `const` token in the proper place (after `pub`). I had to resort to placing it in curly brackets:
      
      ```rust
      pub {const} fn foo(val: u8) -> i8 {
      }
      ```
      
      The `f!` macro then translates this to a function definition with `const` in the proper position.
      
      I'd appreciate it if someone who's more familiar with `macro_rules!` could see if I missed a way to get the desired syntax.
      d742eedf
    • bors's avatar
      Auto merge of #1586 - semarie:openbsd-shm, r=gnzlbg · 5e5c1ee6
      bors authored
      add shm support for NetBSD and OpenBSD
      
      initial work from @landryb for OpenBSD, various fixes and NetBSD support from me.
      
      Fixes #1585
      
      shm support is need for firefox building (for slice-deque)
      
      cc @jakllsch @ryoon for NetBSD
      5e5c1ee6
    • bors's avatar
      Auto merge of #1559 - atouchet:readme, r=gnzlbg · ffe2fed8
      bors authored
      Minor Readme update
      ffe2fed8
    • bors's avatar
      Auto merge of #1574 - Amanieu:deprecate-vfork, r=gnzlbg · a13ad69c
      bors authored
      Deprecate vfork
      
      The compiler may generate incorrect code for `vfork` and `setjmp` because they are missing the `#[returns_twice]` attribute which is currently unstable ([tracking issue](https://github.com/rust-lang/rust/issues/58314)). Since `vfork` is impossible to use safely, I propose deprecating it until `#[returns_twice]` is stable.
      a13ad69c
    • bors's avatar
      Auto merge of #1593 - gnzlbg:fix_ci, r=gnzlbg · b96c0dd3
      bors authored
      Disable broken targets
      b96c0dd3
  4. Nov 17, 2019
  5. Nov 16, 2019
  6. Nov 14, 2019
  7. Nov 13, 2019
  8. Nov 07, 2019
  9. Nov 01, 2019
  10. Oct 29, 2019
  11. Oct 28, 2019
  12. Oct 25, 2019
  13. Oct 24, 2019
  14. Oct 23, 2019
  15. Oct 22, 2019
    • Pietro Albini's avatar
      ci: switch mirrors to use our CDN · 5df4b8d0
      Pietro Albini authored
      We recently added a CDN in front of our CI mirrors as it's faster and
      cheaper for us. This switches libc's CI to use it instead of accessing
      the underlying bucket directly.
      5df4b8d0
  16. Oct 18, 2019
  17. Oct 17, 2019
    • Nick Carter's avatar
      Add struct ip_mreqn: ip multicast req with intf id · 44b90221
      Nick Carter authored
      The ip_mreqn struct has an additional interface id parameter. This
      allows programming IPv4 multicast groups using the interface id
      alongside the src IPv4 address.
      Linux has supported the ip_mreqn struct since Linux 2.2
      ref: man ip.7
      
      [Adding to linux x86_64 only as adding to linux_like/mod.rs caused
      failures in the sparc64 and mips64 C regression tests]
      44b90221
    • gnzlbg's avatar
      Remove duplicate target · 8823376f
      gnzlbg authored
      8823376f
    • gnzlbg's avatar
      Remove broken link · 07d1f7a4
      gnzlbg authored
      07d1f7a4
Loading