File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
1313    "freebsd13" , 
1414    "freebsd14" , 
1515    "freebsd15" , 
16+     "libc_const_extern_fn" , 
1617    "libc_deny_warnings" , 
1718    "libc_ctest" , 
1819] ; 
@@ -74,6 +75,8 @@ fn main() {
7475        set_cfg ( "libc_deny_warnings" ) ; 
7576    } 
7677
78+     set_cfg ( "libc_const_extern_fn" ) ; 
79+ 
7780    // check-cfg is a nightly cargo/rustc feature to warn when unknown cfgs are used across the 
7881    // codebase. libc can configure it if the appropriate environment variable is passed. Since 
7982    // rust-lang/rust enforces it, this is useful when using a custom libc fork there. 
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ macro_rules! e {
199199// cfg completely. 
200200// FIXME(ctest): ctest can't handle `$(,)?` so we use `$(,)*` which isn't quite correct. 
201201cfg_if !  { 
202-     if  #[ cfg( all ( ) ) ]  { 
202+     if  #[ cfg( libc_const_extern_fn ) ]  { 
203203    // if #[cfg(feature = "const-extern-fn")] { 
204204        /// Define an `unsafe` function that is const as long as `const-extern-fn` is enabled. 
205205{ 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments