extern crate gcc;

use std::env;

pub fn main() {
    let target = env::var("TARGET").unwrap();

    let os = if target.contains("linux") {
        "LINUX"
    } else if target.contains("darwin") {
        "DARWIN"
    } else {
        "UNKNOWN"
    };

    gcc::Config::new()
        .file("src/const.c")
        .file("src/sizes.c")
        .define(os, None)
        .compile("libnixtest.a");
}

extern crate gcc;

use std::env;

pub fn main() {
    let target = env::var("TARGET").unwrap();

    let os = if target.contains("linux") {
        "LINUX"
    } else if target.contains("darwin") {
        "DARWIN"
    } else {
        "UNKNOWN"
    };

    gcc::Build::new()
        .file("src/const.c")
        .file("src/sizes.c")
        .define(os, None)
        .compile("libnixtest.a");
}

Fix use of deprecated item: gcc::Config
Fix use of deprecated item: gcc::Config

gcc::Config has been renamed to gcc::Build

This fixes the following warning during run of cargo test

warning: use of deprecated item: gcc::Config has been renamed to gcc::Build
  --> nix-test/build.rs:16:5
   |
16 |     gcc::Config::new()
   |     ^^^^^^^^^^^^^^^^
   |
   = note: #[warn(deprecated)] on by default
