new file: projects/github.com/confluentinc/libserdes/package.yml

new file:   projects/github.com/confluentinc/libserdes/test.c
This commit is contained in:
Andrii Riabchenko 2023-10-30 17:04:00 +02:00 committed by Jacob Heider
parent d804fec5ad
commit 428641dedc
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,26 @@
distributable:
url: https://github.com/confluentinc/libserdes/archive/refs/tags/v7.5.2-rc231027084844.tar.gz
strip-components: 1
versions:
# v7.5.2-rc231027084844
- 7.5.2.231027084844
dependencies:
apache.org/avro: '*'
digip.org/jansson: '*'
curl.se: '*'
build:
dependencies:
linux:
gnu.org/gcc: '*'
gnu.org/make: '*'
script:
- ./configure --prefix={{prefix}}
- make --jobs {{ hw.concurrency }}
- make --jobs {{ hw.concurrency }} install
test:
dependencies:
linux:
gnu.org/gcc: '*'
script:
- cc test.c -lserdes -o test
- ./test

View file

@ -0,0 +1,17 @@
#include <err.h>
#include <stddef.h>
#include <sys/types.h>
#include <libserdes/serdes.h>
int main()
{
char errstr[512];
serdes_conf_t *sconf = serdes_conf_new(NULL, 0, NULL);
serdes_t *serdes = serdes_new(sconf, errstr, sizeof(errstr));
if (serdes == NULL)
{
errx(1, "constructing serdes: %s", errstr);
}
serdes_destroy(serdes);
return 0;
}