summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Makefile.in2
-rw-r--r--libbb/llist_add_to.c15
2 files changed, 16 insertions, 1 deletions
diff --git a/libbb/Makefile.in b/libbb/Makefile.in
index 22fcd83..3f4e773 100644
--- a/libbb/Makefile.in
+++ b/libbb/Makefile.in
@@ -33,7 +33,7 @@ LIBBB_SRC:= \
get_last_path_component.c get_line_from_file.c herror_msg.c \
herror_msg_and_die.c human_readable.c inet_common.c inode_hash.c \
interface.c isdirectory.c kernel_version.c last_char_is.c libc5.c \
- loop.c make_directory.c mode_string.c \
+ llist_add_to.c loop.c make_directory.c mode_string.c \
module_syscalls.c mtab.c mtab_file.c my_getgrgid.c my_getgrnam.c \
my_getpwnam.c my_getpwnamegid.c my_getpwuid.c obscure.c parse_mode.c \
parse_number.c perror_msg.c perror_msg_and_die.c print_file.c \
diff --git a/libbb/llist_add_to.c b/libbb/llist_add_to.c
new file mode 100644
index 0000000..61e53f0
--- /dev/null
+++ b/libbb/llist_add_to.c
@@ -0,0 +1,15 @@
+#include <stdlib.h>
+#include <string.h>
+#include "unarchive.h"
+#include "libbb.h"
+
+extern llist_t *llist_add_to(llist_t *old_head, char *new_item)
+{
+ llist_t *new_head;
+
+ new_head = xmalloc(sizeof(llist_t));
+ new_head->data = new_item;
+ new_head->link = old_head;
+
+ return(new_head);
+}