You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.6 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../musl/pkg/procps/procps.conf
# Copyright (C) 2014 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# approach taken from sabotage linux
musl_procps_addmissing() {
# add minimal internal error.h
cat << EOF > include/error.h
#include <stdio.h>
#include <string.h>
#define PROGRAM_NAME "procps"
#define error(status, errnum, ...) \
do { fflush(stdout); \
dprintf(2, PROGRAM_NAME ": "); \
dprintf(2, __VA_ARGS__); \
if(errnum) dprintf(2, ": %s", strerror(errnum)); \
dprintf(2, "\n"); \
if(status) exit(status); \
} while(0)
#define error_at_line(status, errnum, fn, line, ...) \
do { fflush(stdout); \
dprintf(2, PROGRAM_NAME ": %s:%d", fn, (int) line); \
dprintf(2, __VA_ARGS__); \
if(errnum) dprintf(2, ": %s", strerror(errnum)); \
dprintf(2, "\n"); \
if(status) exit(status); \
} while(0)
EOF
mkdir -p include/sys
# add minimal sys/dir.h
cat << EOF > include/sys/dir.h
#include <dirent.h>
#define direct dirent
EOF
}
hook_add preconf 5 'musl_procps_addmissing'
# sysctl.c: error: 'GLOB_TILDE' undeclared
#var_append CFLAGS ' ' '-DGLOB_TILDE=0'
var_append configprefix ' ' 'CFLAGS="-DGLOB_TILDE=0"'