Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samplerate/common.h needs patching for FreeBSD #49

Open
ghost opened this issue Jun 7, 2015 · 1 comment
Open

samplerate/common.h needs patching for FreeBSD #49

ghost opened this issue Jun 7, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 7, 2015

This needs to include stdint.h for int32_t to be defined. Otherwise the build fails on FreeBSD. It previously used HAVE_STDINT_H which is a macro defined by autotools. You do not use autotools for this software, so I replaced it with a macro check against the version of standard C being used. If the compiler advertises C99 or newer, then stdint.h is present because it is a mandatory header for conforming C99 or newer implementations. Please apply the below patch.

--- src/samplerate/common.h.orig 2014-12-31 18:30:53 UTC
+++ src/samplerate/common.h
@@ -25,7 +25,7 @@
#ifndef COMMON_H_INCLUDED
#define COMMON_H_INCLUDED

-#ifdef HAVE_STDINT_H
+#if STDC_VERSION >= 199901L
#include <stdint.h>
#elif (SIZEOF_INT == 4)
typedef int int32_t ;

@tuffy
Copy link
Owner

tuffy commented Jun 8, 2015

I've gone ahead and just imported stdint outright. Other places in audiotools import it directly and I believe most relevant C implementations should have it as part of the standard library by now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant