File: compile-open

package info (click to toggle)
libmaxminddb 1.12.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,576 kB
  • sloc: ansic: 6,374; perl: 444; makefile: 160; sh: 148
file content (16 lines) | stat: -rwxr-xr-x 342 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

cat > $AUTOPKGTEST_TMP/open.c <<EOF
#include <maxminddb.h>

int main(int argc, char *argv[])
{
    const char *fname = "t/maxmind-db/test-data/GeoIP2-City-Test.mmdb";
    MMDB_s mmdb;
    return MMDB_open(fname, MMDB_MODE_MMAP, &mmdb);
}
EOF

gcc -o $AUTOPKGTEST_TMP/open $AUTOPKGTEST_TMP/open.c -lmaxminddb

$AUTOPKGTEST_TMP/open