#!/bin/sh set -e trap 'rm o' 0 cflags="-Wall -Wextra -Wpedantic" cflags="$cflags $(pkg-config --libs --cflags libimobiledevice-glue-1.0)" cc -x c - -o o $cflags < #include #include int main(void) { printf("Glue version: %s\n", libimobiledevice_glue_version()); char *uuid = string_toupper(generate_uuid()); printf("A random UUID: %s\n", uuid); /* An UUID must contain no characters other than these and be 128 bits long: * https://datatracker.ietf.org/doc/html/rfc4122 */ return uuid[strspn(uuid, "0123456789ABCDEF-")] && strlen(uuid) == 128; } EOF ./o