nandi/jolt-nativepublic Fork 0
5acc801872977305e0f29a8dc4aca4ddca240f98
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

zig-include · 17 lines · 971 BBash Blame HistoryRaw
Lift freeq's AV media plane out of sleek 90f8b89 nandi 19d ago1#!/bin/sh
2# Print zig's bundled Linux userspace headers directory.
3#
4# `v4l2r` and any other bindgen build script want `linux/videodev2.h`, which
5# lives in /usr/include on a machine with kernel headers installed and nowhere
6# at all on one without. zig ships its own copy, and since everything here is
7# already compiled by zig, using them keeps the promise the toolchain makes:
8# this workspace builds with no system C toolchain and no system headers.
9#
10# The path is derived rather than written down — it moves with every zig
11# version, and a hard-coded one is a build that breaks on the next upgrade.
12zig="$(dirname "$0")/zig"
13# Resolve through DotSlash, which prints the real binary when asked.
14real="$("$zig" --help >/dev/null 2>&1 && command -v "$zig")"
15lib="$(dirname "$(readlink -f "$(ls -d "$HOME"/.cache/dotslash/*/*/zig-*/zig 2>/dev/null | head -1)")")/lib"
16[ -d "$lib/libc/include/any-linux-any" ] || exit 1
17printf '%s\n' "$lib/libc/include/any-linux-any"