1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-06-02 07:20:47 +00:00
conky/src/haiku.h
Brenden Matthews eebc8c653b
Add formatting/static analysis (#486)
* Reform source with clang-format.

Rules applied with:
    $ find . -iname *.h -o -iname *.cc | xargs clang-format \
        -style=file -i -fallback-style=google

* Add clang-format and analyze to build.

Based on the excellent work at: https://github.com/ttroy50/cmake-examples

* Clean up CMake stuff on macOS.

* Remove vim/emacs modelines.

* Update copyright dates.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.
2018-05-12 12:03:00 -04:00

42 lines
740 B
C

/* */
#ifndef HAIKU_H_
#define HAIKU_H_
#include <err.h>
#include <fcntl.h>
#include <limits.h>
#include <paths.h>
#include <time.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <net/if.h>
#include <kernel/fs_info.h>
#include "common.h"
#include "conky.h"
int get_entropy_avail(unsigned int *);
int get_entropy_poolsize(unsigned int *);
/* let's just mimic statfs64 */
struct statfs : public fs_info {};
inline int statfs(const char *path, struct statfs *buf) {
return fs_stat_dev(dev_for_path(path), buf);
}
#define f_blocks total_blocks
#define f_bsize block_size
#define f_bavail free_blocks
#define f_bfree free_blocks
#define f_fstypename fsh_name
#endif /*HAIKU_H_*/