From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ismael Luceno <ismael@sourcemage.org>
Date: Sun, 29 Nov 2026 01:08:06 +0100
Subject: [PATCH] Expose fseeko and ftello

Needed by musl libc in -std=c11 mode.

Upstream-Status: Pending
Signed-off-by: Ismael Luceno <ismael@sourcemage.org>
---
 apps/aomenc.c                           | 4 ++++
 examples/lightfield_bitstream_parsing.c | 4 ++++
 examples/lightfield_decoder.c           | 4 ++++
 3 files changed, 12 insertions(+)

--- a/apps/aomenc.c
+++ b/apps/aomenc.c
@@ -9,6 +9,9 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+/* for fseeko()/ftello() */
+#define _POSIX_C_SOURCE 200112L
+
 #include "apps/aomenc.h"
 
 #include "config/aom_config.h"
--- a/examples/lightfield_bitstream_parsing.c
+++ b/examples/lightfield_bitstream_parsing.c
@@ -37,6 +36,9 @@
 // tile_colN, and tile_rowN identify an individual tile to be decoded and
 // to use anchor_indexN anchor image for MCP.
 
+/* for fseeko()/ftello() */
+#define _POSIX_C_SOURCE 200112L
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
--- a/examples/lightfield_decoder.c
+++ b/examples/lightfield_decoder.c
@@ -35,6 +35,9 @@
 // tile_colN, and tile_rowN identify an individual tile to be decoded and
 // to use anchor_indexN anchor image for MCP.
 
+/* for fseeko()/ftello() */
+#define _POSIX_C_SOURCE 200112L
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-- 
