Skip to content

docs: fix libkrun.h self-containment and net API refs#702

Open
immanuwell wants to merge 1 commit into
containers:mainfrom
immanuwell:docs/header-api-fixes
Open

docs: fix libkrun.h self-containment and net API refs#702
immanuwell wants to merge 1 commit into
containers:mainfrom
immanuwell:docs/header-api-fixes

Conversation

@immanuwell
Copy link
Copy Markdown

libkrun.h was not self-contained, so a normal C file that only includes the public header failed on uid_t and gid_t.
README also pointed to krun_add_net_unixdgram, but the exported API is krun_add_net_unixgram, so copy paste code just blows up.

Repro for the header bug:

#include "include/libkrun.h"
int main(void) { return 0; }
cc -std=c11 -Werror -I. /tmp/t.c -c

Repro for the README typo:

#include "include/libkrun.h"
#include <stdint.h>
int main(void) {
    uint8_t mac[6] = {0};
    return krun_add_net_unixdgram(1, 0, -1, mac, 0, 0);
}

This adds <sys/types.h>, fixes the README API name, and cleans the nearby unixgram docs. Small paper cut, but pretty real.

Signed-off-by: immanuwell <pchpr.00@list.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant