https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
12 lines
166 B
C
12 lines
166 B
C
#include <stdio.h>
|
|
|
|
extern unsigned int foo(void);
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
if (foo() != 42) {
|
|
return 1;
|
|
}
|
|
fprintf(stderr, "ok\n");
|
|
return 0;
|
|
}
|