From 04733ccb563bb3c556ee7ccb959c435eb69dd2fd Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Wed, 11 Aug 2021 19:33:26 +0200 Subject: LibC: Add stub for res_query --- Userland/Libraries/LibC/CMakeLists.txt | 1 + Userland/Libraries/LibC/resolv.cpp | 17 +++++++++++++++++ Userland/Libraries/LibC/resolv.h | 15 +++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 Userland/Libraries/LibC/resolv.cpp create mode 100644 Userland/Libraries/LibC/resolv.h (limited to 'Userland/Libraries') diff --git a/Userland/Libraries/LibC/CMakeLists.txt b/Userland/Libraries/LibC/CMakeLists.txt index 46108b0d22..0d701aa1b3 100644 --- a/Userland/Libraries/LibC/CMakeLists.txt +++ b/Userland/Libraries/LibC/CMakeLists.txt @@ -28,6 +28,7 @@ set(LIBC_SOURCES pwd.cpp qsort.cpp regex.cpp + resolv.cpp scanf.cpp sched.cpp serenity.cpp diff --git a/Userland/Libraries/LibC/resolv.cpp b/Userland/Libraries/LibC/resolv.cpp new file mode 100644 index 0000000000..5ece62bdfc --- /dev/null +++ b/Userland/Libraries/LibC/resolv.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2021, the SerenityOS developers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +extern "C" { + +int res_query(char const*, int, int, unsigned char*, int) +{ + dbgln("FIXME: Implement res_query()"); + return 0; +} +} diff --git a/Userland/Libraries/LibC/resolv.h b/Userland/Libraries/LibC/resolv.h new file mode 100644 index 0000000000..3ff1d10667 --- /dev/null +++ b/Userland/Libraries/LibC/resolv.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2021, the SerenityOS developers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include + +__BEGIN_DECLS + +int res_query(const char* dname, int class_, int type, unsigned char* answer, int anslen); + +__END_DECLS -- cgit v1.2.3