1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

[smb] Added smb to meson

This commit is contained in:
Witold Filipczyk 2022-01-11 20:34:35 +01:00
parent 89f99a0667
commit 2f44f512fe
2 changed files with 15 additions and 3 deletions

View File

@ -328,6 +328,11 @@ if conf_data.get('CONFIG_FSP')
deps += fspdeps
endif
if conf_data.get('CONFIG_SMB')
smbdeps = dependency('smbclient', static: st)
deps += smbdeps
endif
dep_atomic = dependency('', required: false)
if not compiler.links('''#include <stdint.h>

View File

@ -5,9 +5,7 @@
#endif
#include <errno.h>
#ifdef HAVE_LIBSMBCLIENT_H
#include <libsmbclient.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -38,13 +36,22 @@
#include "util/memory.h"
#include "util/string.h"
static char elsmbversion[32];
static void
init_smb(struct module *module)
{
snprintf(elsmbversion, 31, "SMB(%s)", smbc_version());
module->name = elsmbversion;
}
struct module smb_protocol_module = struct_module(
/* name: */ N_("SMB"),
/* options: */ NULL,
/* hooks: */ NULL,
/* submodules: */ NULL,
/* data: */ NULL,
/* init: */ NULL,
/* init: */ init_smb,
/* done: */ NULL
);