[PATCH v4 1/2] Fix __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__

Andreas Schwab schwab@linux-m68k.org
Sat Sep 13 11:25:00 GMT 2014


FX <fxcoudert@gmail.com> writes:

> @@ -142,16 +140,16 @@ darwin_default_min_version (unsigned int
>  
>  #ifndef CROSS_DIRECTORY_STRUCTURE
>  
> - /* Try to find the version from the kernel, if we fail - we print a message 
> -    and give up.  */
> - if (!darwin_find_version_from_kernel (new_flag))
> -   return;
> +  /* Try to find the version from the kernel, if we fail - we print a message 
> +     and give up.  */
> +  new_flag = darwin_find_version_from_kernel ();
> +  if (!new_flag)
> +    return;
>  
>  #else
>  
> - /* For cross-compilers, default to the target OS version. */
> -
> - strncpy (new_flag, DEF_MIN_OSX_VERSION, sizeof (new_flag));
> +  /* For cross-compilers, default to the target OS version. */
> +  new_flag = xstrdup (DEF_MIN_OSX_VERSION);

I don't think you need strdup here.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Gcc-patches mailing list