diff mbox

linux-generic: shared mem: Add _POSIX_C_SOURCE 200809L

Message ID 1420834676-28272-1-git-send-email-mike.holmes@linaro.org
State Accepted
Headers show

Commit Message

Mike Holmes Jan. 9, 2015, 8:17 p.m. UTC
Fixes https://bugs.linaro.org/show_bug.cgi?id=787

Adding _POSIX_C_SOURCE 200809L allows compilation to std=c99 by adding
ftruncate from this standard.

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 platform/linux-generic/odp_shared_memory.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Bill Fischofer Jan. 9, 2015, 9:10 p.m. UTC | #1
On Fri, Jan 9, 2015 at 2:17 PM, Mike Holmes <mike.holmes@linaro.org> wrote:

> Fixes https://bugs.linaro.org/show_bug.cgi?id=787
>
> Adding _POSIX_C_SOURCE 200809L allows compilation to std=c99 by adding
> ftruncate from this standard.
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  platform/linux-generic/odp_shared_memory.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/platform/linux-generic/odp_shared_memory.c
> b/platform/linux-generic/odp_shared_memory.c
> index abf6da3..99c5b40 100644
> --- a/platform/linux-generic/odp_shared_memory.c
> +++ b/platform/linux-generic/odp_shared_memory.c
> @@ -4,6 +4,9 @@
>   * SPDX-License-Identifier:     BSD-3-Clause
>   */
>
> +/*ftruncate _POSIX_C_SOURCE 200809L */
> +#define _POSIX_C_SOURCE 200809L
> +
>  #include <odp_shared_memory.h>
>  #include <odp_internal.h>
>  #include <odp_spinlock.h>
> --
> 2.1.0
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov Jan. 12, 2015, 4:48 p.m. UTC | #2
Merged,
Maxim.

On 01/09/2015 11:17 PM, Mike Holmes wrote:
> Fixes https://bugs.linaro.org/show_bug.cgi?id=787
>
> Adding _POSIX_C_SOURCE 200809L allows compilation to std=c99 by adding
> ftruncate from this standard.
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>   platform/linux-generic/odp_shared_memory.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c
> index abf6da3..99c5b40 100644
> --- a/platform/linux-generic/odp_shared_memory.c
> +++ b/platform/linux-generic/odp_shared_memory.c
> @@ -4,6 +4,9 @@
>    * SPDX-License-Identifier:     BSD-3-Clause
>    */
>   
> +/*ftruncate _POSIX_C_SOURCE 200809L */
> +#define _POSIX_C_SOURCE 200809L
> +
>   #include <odp_shared_memory.h>
>   #include <odp_internal.h>
>   #include <odp_spinlock.h>
diff mbox

Patch

diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c
index abf6da3..99c5b40 100644
--- a/platform/linux-generic/odp_shared_memory.c
+++ b/platform/linux-generic/odp_shared_memory.c
@@ -4,6 +4,9 @@ 
  * SPDX-License-Identifier:     BSD-3-Clause
  */
 
+/*ftruncate _POSIX_C_SOURCE 200809L */
+#define _POSIX_C_SOURCE 200809L
+
 #include <odp_shared_memory.h>
 #include <odp_internal.h>
 #include <odp_spinlock.h>