File: missing.h

package info (click to toggle)
bluez 5.85-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 20,016 kB
  • sloc: ansic: 423,507; python: 4,751; sh: 4,580; makefile: 750; xml: 126
file content (21 lines) | stat: -rw-r--r-- 393 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// SPDX-License-Identifier: LGPL-2.1-or-later
/*
 *
 *  BlueZ - Bluetooth protocol stack for Linux
 *
 *  Copyright (C) 2024  Khem Raj <raj.khem@gmail.com>
 *
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if !HAVE_DECL_BASENAME
#include <string.h>
static inline const char *basename(const char *path)
{
	const char *base = strrchr(path, '/');

	return base ? base + 1 : path;
}
#endif