From cd5c9e6a923878e797212d27476ee217eb844a14 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Thu, 11 Feb 2021 15:40:48 +0100 Subject: Added Linux compatibility --- ft_list_size.s | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ft_list_size.s') diff --git a/ft_list_size.s b/ft_list_size.s index b41cfb4..0d80bd9 100644 --- a/ft_list_size.s +++ b/ft_list_size.s @@ -10,10 +10,17 @@ ; ; ; **************************************************************************** ; -global _ft_list_size +%ifdef __LINUX__ + %define M_FT_LIST_SIZE ft_list_size +%else + %define M_FT_LIST_SIZE _ft_list_size +%endif +global M_FT_LIST_SIZE + +section .text ; int ft_list_size(t_list *begin_list); -_ft_list_size: +M_FT_LIST_SIZE: xor eax, eax FT_LIST_SIZE_LOOP: cmp rdi, 0 -- cgit