Skip to content
Snippets Groups Projects
  1. Nov 27, 2019
  2. Nov 22, 2019
  3. Nov 21, 2019
    • bors's avatar
      Auto merge of #1588 - oxalica:upgrade-musl, r=gnzlbg · 2d94f3f3
      bors authored
      Upgrade to musl 1.1.24 in CI
      
      Required by #1577
      
      Note that in musl 1.1.24, `struct sched_param` from `sched.h` has changed and some fields became reserved. So [these fields](https://github.com/rust-lang/libc/blob/13d4a5da2eafd82d3ebb2acb729d8b8c9148fb1f/src/unix/linux_like/mod.rs#L97) are outdated. I'm not sure if we should rename them, since they are in public API.
      
      I simply skip `struct sched_param` from the test now.
      
      Here's the diff between musl 1.1.23 and 1.1.24
      ```
      diff --git a/include/sched.h b/include/sched.h
      index 05d40b1e..7e470d3a 100644
      --- a/include/sched.h
      +++ b/include/sched.h
      @@ -18,10 +18,12 @@ extern "C" {
      
       struct sched_param {
              int sched_priority;
      -       int sched_ss_low_priority;
      -       struct timespec sched_ss_repl_period;
      -       struct timespec sched_ss_init_budget;
      -       int sched_ss_max_repl;
      +       int __reserved1;
      +       struct {
      +               time_t __reserved1;
      +               long __reserved2;
      +       } __reserved2[2];
      +       int __reserved3;
       };
      ```
      2d94f3f3
    • bors's avatar
      Auto merge of #1599 - YangKeao:macos, r=gnzlbg · cd47b46a
      bors authored
      
      add pthread_getname_np for mac os
      
      In macos's `pthread.h`
      
      ```c
      /*SPI to set and get pthread name*/
      __API_AVAILABLE(macos(10.6), ios(3.2))
      int	pthread_getname_np(pthread_t,char*,size_t);
      
      __API_AVAILABLE(macos(10.6), ios(3.2))
      int	pthread_setname_np(const char*);
      ```
      
      I believe `pthread_getname_np` is usable in macos after 10.6.
      
      Signed-off-by: default avatarYang Keao <keao.yang@yahoo.com>
      cd47b46a
    • bors's avatar
      Auto merge of #1602 - Aaron1011:fix/rustc-tarball, r=gnzlbg · f992fd41
      bors authored
      Fix build.rs failing with a rustc built from a tarball
      
      Fixes #1601
      f992fd41
  4. Nov 20, 2019
  5. Nov 19, 2019
  6. 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
  7. Nov 17, 2019
  8. Nov 16, 2019
  9. Nov 14, 2019
  10. Nov 13, 2019
  11. Nov 07, 2019
  12. Nov 01, 2019
  13. Oct 29, 2019
  14. Oct 28, 2019
  15. Oct 25, 2019
Loading