Compare commits

...

4 Commits

Author SHA1 Message Date
Bananymous 8e00b3d110 ports: Add ffmpeg port
This allows basic video and audio playback on banan-os!
2025-12-28 00:12:03 +02:00
Bananymous 6fbf1469aa LibC: define static_assert in assert.h
This is needed from C11 until C23
2025-12-28 00:12:03 +02:00
Bananymous 280d3fd919 LibC: Fix assert.h include guard 2025-12-28 00:12:03 +02:00
Bananymous 40ce95b87f LibC: Add definition for TCP_MAXSEG
This is not implemented yet
2025-12-27 23:37:03 +02:00
3 changed files with 26 additions and 1 deletions

20
ports/ffmpeg/build.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash ../install.sh
NAME='ffmpeg'
VERSION='8.0.1'
DOWNLOAD_URL="https://ffmpeg.org/releases/ffmpeg-$VERSION.tar.xz#05ee0b03119b45c0bdb4df654b96802e909e0a752f72e4fe3794f487229e5a41"
DEPENDENCIES=('SDL2')
CONFIGURE_OPTIONS=(
'--prefix=/usr'
'--target-os=none'
"--arch=$BANAN_ARCH"
"--cc=$CC"
"--cxx=$CXX"
'--enable-cross-compile'
'--enable-shared'
'--enable-gpl'
)
configure() {
./configure "${CONFIGURE_OPTIONS[@]}"
}

View File

@ -1,4 +1,4 @@
#ifndef __ASSERT_H
#ifndef _ASSERT_H
#define _ASSERT_H 1
// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/assert.h.html
@ -11,6 +11,10 @@
#define assert(expr) ((expr) ? (void)0 : __assert_fail(#expr, __FILE__, __LINE__, __func__))
#endif
#if !defined(__cplusplus) && __STDC_VERSION__ >= 201112L && __STDC_VERSION__ < 202311L
#define static_assert _Static_assert
#endif
__BEGIN_DECLS
__attribute__((noreturn))

View File

@ -8,6 +8,7 @@
__BEGIN_DECLS
#define TCP_NODELAY 1
#define TCP_MAXSEG 2
__END_DECLS