[LG G5 Guides, News, & Discussion] Honestly Annoying:
I'm still getting the same errors... I tried compiling on Ubuntu 32-bit and it gave me these errors (there are a lot)

exploit.cpp:57:10: error: ‘__le32’ does not name a type

__le32 s_clusters_per_group;

^

exploit.cpp:58:10: error: ‘__le32’ does not name a type

__le32 s_inodes_per_group;

^

exploit.cpp:59:10: error: ‘__le32’ does not name a type

__le32 s_mtime;

^

exploit.cpp:60:10: error: ‘__le32’ does not name a type

/*30*/ __le32 s_wtime;

^

exploit.cpp:61:10: error: ‘__le16’ does not name a type

__le16 s_mnt_count;

^

exploit.cpp:62:10: error: ‘__le16’ does not name a type

__le16 s_max_mnt_count;

^

exploit.cpp:63:10: error: ‘__le16’ does not name a type

__le16 s_magic;

^

exploit.cpp:64:10: error: ‘__le16’ does not name a type

__le16 s_state;

^

exploit.cpp:65:10: error: ‘__le16’ does not name a type

__le16 s_errors;

^

exploit.cpp:66:10: error: ‘__le16’ does not name a type

__le16 s_minor_rev_level;

^

exploit.cpp:67:10: error: ‘__le32’ does not name a type

/*40*/ __le32 s_lastcheck;

^

exploit.cpp:68:10: error: ‘__le32’ does not name a type

__le32 s_checkinterval;

^

exploit.cpp:69:10: error: ‘__le32’ does not name a type

__le32 s_creator_os;

^

exploit.cpp:70:10: error: ‘__le32’ does not name a type

__le32 s_rev_level;

^

exploit.cpp:71:10: error: ‘__le16’ does not name a type

/*50*/ __le16 s_def_resuid;

^

exploit.cpp:72:10: error: ‘__le16’ does not name a type

__le16 s_def_resgid;

^

exploit.cpp:73:10: error: ‘__le32’ does not name a type

__le32 s_first_ino;

^

exploit.cpp:74:10: error: ‘__le16’ does not name a type

__le16 s_inode_size;

^

exploit.cpp:75:10: error: ‘__le16’ does not name a type

__le16 s_block_group_nr;

^

exploit.cpp:76:10: error: ‘__le32’ does not name a type

__le32 s_feature_compat;

^

exploit.cpp:77:10: error: ‘__le32’ does not name a type

/*60*/ __le32 s_feature_incompat;

^

exploit.cpp:78:10: error: ‘__le32’ does not name a type

__le32 s_feature_ro_compat;

^

exploit.cpp:79:10: error: ‘__u8’ does not name a type

/*68*/ __u8 s_uuid[16];

^

exploit.cpp:82:10: error: ‘__le32’ does not name a type

/*C8*/ __le32 s_algorithm_usage_bitmap;

^

exploit.cpp:83:10: error: ‘__u8’ does not name a type

__u8 s_prealloc_blocks;

^

exploit.cpp:84:10: error: ‘__u8’ does not name a type

__u8 s_prealloc_dir_blocks;

^

exploit.cpp:85:10: error: ‘__le16’ does not name a type

__le16 s_reserved_gdt_blocks;

^

exploit.cpp:86:10: error: ‘__u8’ does not name a type

/*D0*/ __u8 s_journal_uuid[16];

^

exploit.cpp:87:10: error: ‘__le32’ does not name a type

/*E0*/ __le32 s_journal_inum;

^

exploit.cpp:88:10: error: ‘__le32’ does not name a type

__le32 s_journal_dev;

^

exploit.cpp:89:10: error: ‘__le32’ does not name a type

__le32 s_last_orphan;

^

exploit.cpp:90:10: error: ‘__le32’ does not name a type

__le32 s_hash_seed[4];

^

exploit.cpp:91:10: error: ‘__u8’ does not name a type

__u8 s_def_hash_version;

^

exploit.cpp:92:10: error: ‘__u8’ does not name a type

__u8 s_jnl_backup_type;

^

exploit.cpp:93:10: error: ‘__le16’ does not name a type

__le16 s_desc_size;

^

exploit.cpp:94:10: error: ‘__le32’ does not name a type

/*100*/ __le32 s_default_mount_opts;

^

exploit.cpp:95:10: error: ‘__le32’ does not name a type

__le32 s_first_meta_bg;

^

exploit.cpp:96:10: error: ‘__le32’ does not name a type

__le32 s_mkfs_time;

^

exploit.cpp:97:10: error: ‘__le32’ does not name a type

__le32 s_jnl_blocks[17];

^

exploit.cpp:98:10: error: ‘__le32’ does not name a type

/*150*/ __le32 s_blocks_count_hi;

^

exploit.cpp:99:10: error: ‘__le32’ does not name a type

__le32 s_r_blocks_count_hi;

^

exploit.cpp:100:10: error: ‘__le32’ does not name a type

__le32 s_free_blocks_count_hi;

^

exploit.cpp:101:10: error: ‘__le16’ does not name a type

__le16 s_min_extra_isize;

^

exploit.cpp:102:10: error: ‘__le16’ does not name a type

__le16 s_want_extra_isize;

^

exploit.cpp:103:10: error: ‘__le32’ does not name a type

__le32 s_flags;

^

exploit.cpp:104:10: error: ‘__le16’ does not name a type

__le16 s_raid_stride;

^

exploit.cpp:105:10: error: ‘__le16’ does not name a type

__le16 s_mmp_update_interval;

^

exploit.cpp:106:10: error: ‘__le64’ does not name a type

__le64 s_mmp_block;

^

exploit.cpp:107:10: error: ‘__le32’ does not name a type

__le32 s_raid_stripe_width;

^

exploit.cpp:108:10: error: ‘__u8’ does not name a type

__u8 s_log_groups_per_flex;

^

exploit.cpp:109:10: error: ‘__u8’ does not name a type

__u8 s_checksum_type;

^

exploit.cpp:110:10: error: ‘__u8’ does not name a type

__u8 s_encryption_level;

^

exploit.cpp:111:10: error: ‘__u8’ does not name a type

__u8 s_reserved_pad;

^

exploit.cpp:112:10: error: ‘__le64’ does not name a type

__le64 s_kbytes_written;

^

exploit.cpp:113:10: error: ‘__le32’ does not name a type

__le32 s_snapshot_inum;

^

exploit.cpp:114:10: error: ‘__le32’ does not name a type

__le32 s_snapshot_id;

^

exploit.cpp:115:10: error: ‘__le64’ does not name a type

__le64 s_snapshot_r_blocks_count;

^

exploit.cpp:116:10: error: ‘__le32’ does not name a type

__le32 s_snapshot_list;

^

exploit.cpp:118:10: error: ‘__le32’ does not name a type

__le32 s_error_count;

^

exploit.cpp:119:10: error: ‘__le32’ does not name a type

__le32 s_first_error_time;

^

exploit.cpp:120:10: error: ‘__le32’ does not name a type

__le32 s_first_error_ino;

^

exploit.cpp:121:10: error: ‘__le64’ does not name a type

__le64 s_first_error_block;

^

exploit.cpp:122:10: error: ‘__u8’ does not name a type

__u8 s_first_error_func[32];

^

exploit.cpp:123:10: error: ‘__le32’ does not name a type

__le32 s_first_error_line;

^

exploit.cpp:124:10: error: ‘__le32’ does not name a type

__le32 s_last_error_time;

^

exploit.cpp:125:10: error: ‘__le32’ does not name a type

__le32 s_last_error_ino;

^

exploit.cpp:126:10: error: ‘__le32’ does not name a type

__le32 s_last_error_line;

^

exploit.cpp:127:10: error: ‘__le64’ does not name a type

__le64 s_last_error_block;

^

exploit.cpp:128:10: error: ‘__u8’ does not name a type

__u8 s_last_error_func[32];

^

exploit.cpp:130:10: error: ‘__u8’ does not name a type

__u8 s_mount_opts[64];

^

exploit.cpp:131:10: error: ‘__le32’ does not name a type

__le32 s_usr_quota_inum;

^

exploit.cpp:132:10: error: ‘__le32’ does not name a type

__le32 s_grp_quota_inum;

^

exploit.cpp:133:10: error: ‘__le32’ does not name a type

__le32 s_overhead_clusters;

^

exploit.cpp:134:10: error: ‘__le32’ does not name a type

__le32 s_backup_bgs[2];

^

exploit.cpp:135:10: error: ‘__u8’ does not name a type

__u8 s_encrypt_algos[4];

^

exploit.cpp:136:10: error: ‘__u8’ does not name a type

__u8 s_encrypt_pw_salt[16];

^

exploit.cpp:137:10: error: ‘__le32’ does not name a type

__le32 s_lpf_ino;

^

exploit.cpp:138:10: error: ‘__le32’ does not name a type

__le32 s_prj_quota_inum;

^

exploit.cpp:139:10: error: ‘__le32’ does not name a type

__le32 s_checksum_seed;

^

exploit.cpp:140:10: error: ‘__le32’ does not name a type

__le32 s_reserved[98];

^

exploit.cpp:141:9: error: ‘__le32’ does not name a type

__le32 s_checksum;

^

exploit.cpp:146:10: error: ‘__le32’ does not name a type

__le32 bg_block_bitmap_lo;

^

exploit.cpp:147:10: error: ‘__le32’ does not name a type

__le32 bg_inode_bitmap_lo;

^

exploit.cpp:148:10: error: ‘__le32’ does not name a type

__le32 bg_inode_table_lo;

^

exploit.cpp:149:10: error: ‘__le16’ does not name a type

__le16 bg_free_blocks_count_lo;

^

exploit.cpp:150:10: error: ‘__le16’ does not name a type

__le16 bg_free_inodes_count_lo;

^

exploit.cpp:151:10: error: ‘__le16’ does not name a type

__le16 bg_used_dirs_count_lo;

^

exploit.cpp:152:10: error: ‘__le16’ does not name a type

__le16 bg_flags;

^

exploit.cpp:153:10: error: ‘__le32’ does not name a type

__le32 bg_exclude_bitmap_lo;

^

exploit.cpp:154:10: error: ‘__le16’ does not name a type

__le16 bg_block_bitmap_csum_lo;

^

exploit.cpp:155:10: error: ‘__le16’ does not name a type

__le16 bg_inode_bitmap_csum_lo;

^

exploit.cpp:156:10: error: ‘__le16’ does not name a type

__le16 bg_itable_unused_lo;

^

exploit.cpp:157:10: error: ‘__le16’ does not name a type

__le16 bg_checksum;

^

exploit.cpp:158:10: error: ‘__le32’ does not name a type

__le32 bg_block_bitmap_hi;

^

exploit.cpp:159:10: error: ‘__le32’ does not name a type

__le32 bg_inode_bitmap_hi;

^

exploit.cpp:160:10: error: ‘__le32’ does not name a type

__le32 bg_inode_table_hi;

^

exploit.cpp:161:10: error: ‘__le16’ does not name a type

__le16 bg_free_blocks_count_hi;

^

exploit.cpp:162:10: error: ‘__le16’ does not name a type

__le16 bg_free_inodes_count_hi;

^

exploit.cpp:163:10: error: ‘__le16’ does not name a type

__le16 bg_used_dirs_count_hi;

^

exploit.cpp:164:10: error: ‘__le16’ does not name a type

__le16 bg_itable_unused_hi;

^

exploit.cpp:165:10: error: ‘__le32’ does not name a type

__le32 bg_exclude_bitmap_hi;

^

exploit.cpp:166:10: error: ‘__le16’ does not name a type

__le16 bg_block_bitmap_csum_hi;

^

exploit.cpp:167:10: error: ‘__le16’ does not name a type

__le16 bg_inode_bitmap_csum_hi;

^

exploit.cpp:168:10: error: ‘__u32’ does not name a type

__u32 bg_reserved;

^

exploit.cpp:172:10: error: ‘__le16’ does not name a type

__le16 i_mode;

^

exploit.cpp:173:10: error: ‘__le16’ does not name a type

__le16 i_uid;

^

exploit.cpp:174:10: error: ‘__le32’ does not name a type

__le32 i_size_lo;

^

exploit.cpp:175:10: error: ‘__le32’ does not name a type

__le32 i_atime;

^

exploit.cpp:176:10: error: ‘__le32’ does not name a type

__le32 i_ctime;

^

exploit.cpp:177:10: error: ‘__le32’ does not name a type

__le32 i_mtime;

^

exploit.cpp:178:10: error: ‘__le32’ does not name a type

__le32 i_dtime;

^

exploit.cpp:179:10: error: ‘__le16’ does not name a type

__le16 i_gid;

^

exploit.cpp:180:10: error: ‘__le16’ does not name a type

__le16 i_links_count;

^

exploit.cpp:181:10: error: ‘__le32’ does not name a type

__le32 i_blocks_lo;

^

exploit.cpp:182:10: error: ‘__le32’ does not name a type

__le32 i_flags;

^

exploit.cpp:185:26: error: ‘__le32’ does not name a type

__le32 l_i_version;

^

exploit.cpp:188:26: error: ‘__u32’ does not name a type

__u32 h_i_translator;

^

exploit.cpp:191:26: error: ‘__u32’ does not name a type

__u32 m_i_reserved1;

^

exploit.cpp:194:10: error: ‘__le32’ does not name a type

__le32 i_block[15];

^

exploit.cpp:195:10: error: ‘__le32’ does not name a type

__le32 i_generation;

^

exploit.cpp:196:10: error: ‘__le32’ does not name a type

__le32 i_file_acl_lo;

^

exploit.cpp:197:10: error: ‘__le32’ does not name a type

__le32 i_size_high;

^

exploit.cpp:198:10: error: ‘__le32’ does not name a type

__le32 i_obso_faddr;

^

exploit.cpp:201:26: error: ‘__le16’ does not name a type

__le16 l_i_blocks_high;

^

exploit.cpp:202:26: error: ‘__le16’ does not name a type

__le16 l_i_file_acl_high;

^

exploit.cpp:203:26: error: ‘__le16’ does not name a type

__le16 l_i_uid_high;

^

exploit.cpp:204:26: error: ‘__le16’ does not name a type

__le16 l_i_gid_high;

^

exploit.cpp:205:26: error: ‘__le16’ does not name a type

__le16 l_i_checksum_lo;

^

exploit.cpp:206:26: error: ‘__le16’ does not name a type

__le16 l_i_reserved;

^

exploit.cpp:209:26: error: ‘__le16’ does not name a type

__le16 h_i_reserved1;

^

exploit.cpp:210:26: error: ‘__u16’ does not name a type

__u16 h_i_mode_high;

^

exploit.cpp:211:26: error: ‘__u16’ does not name a type

__u16 h_i_uid_high;

^

exploit.cpp:212:26: error: ‘__u16’ does not name a type

__u16 h_i_gid_high;

^

exploit.cpp:213:26: error: ‘__u32’ does not name a type

__u32 h_i_author;

^

exploit.cpp:216:26: error: ‘__le16’ does not name a type

__le16 h_i_reserved1;

^

exploit.cpp:217:26: error: ‘__le16’ does not name a type

__le16 m_i_file_acl_high;

^

exploit.cpp:218:26: error: ‘__u32’ does not name a type

__u32 m_i_reserved2[2];

^

exploit.cpp:221:10: error: ‘__le16’ does not name a type

__le16 i_extra_isize;

^

exploit.cpp:222:10: error: ‘__le16’ does not name a type

__le16 i_checksum_hi;

^

exploit.cpp:223:10: error: ‘__le32’ does not name a type

__le32 i_ctime_extra;

^

exploit.cpp:224:10: error: ‘__le32’ does not name a type

__le32 i_mtime_extra;

^

exploit.cpp:225:10: error: ‘__le32’ does not name a type

__le32 i_atime_extra;

^

exploit.cpp:226:10: error: ‘__le32’ does not name a type

__le32 i_crtime;

^

exploit.cpp:227:10: error: ‘__le32’ does not name a type

__le32 i_crtime_extra;

^

exploit.cpp:228:10: error: ‘__le32’ does not name a type

__le32 i_version_hi;

^

exploit.cpp: In function ‘void get_system_dev(char*, int)’:

exploit.cpp:246:33: error: ‘memset’ was not declared in this scope

memset(buff, 0, sizeof(buff));

^

exploit.cpp:252:49: error: ‘strstr’ was not declared in this scope

int sres = atoi(strstr(buff, " /system "));

^

exploit.cpp:259:51: error: ‘strncpy’ was not declared in this scope

strncpy(link, &buff[pos], tmppos - pos);

^

exploit.cpp: In function ‘void second_step()’:

exploit.cpp:302:57: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__ino_t {aka long unsigned int}’ [-Wformat=]

printf("[+] Looking for inode no.: %llu\n", s.st_ino);

^

exploit.cpp:319:40: error: ‘struct ext4_super_block’ has no member named ‘s_log_block_size’

int block_size = 1024 << super.s_log_block_size;

^

exploit.cpp:320:37: error: ‘struct ext4_super_block’ has no member named ‘s_inodes_per_group’

int bg = (inodeno-1) /super.s_inodes_per_group;

^

exploit.cpp:322:44: error: ‘struct ext4_super_block’ has no member named ‘s_desc_size’

lseek(fd, block_size + bg * (super.s_desc_size ? super.s_desc_size : sizeof(struct ext4_group_desc) ), SEEK_SET);

^

exploit.cpp:322:64: error: ‘struct ext4_super_block’ has no member named ‘s_desc_size’

lseek(fd, block_size + bg * (super.s_desc_size ? super.s_desc_size : sizeof(struct ext4_group_desc) ), SEEK_SET);

^

exploit.cpp:326:50: error: ‘struct ext4_super_block’ has no member named ‘s_inodes_per_group’

unsigned int index = (inodeno-1) % super.s_inodes_per_group;

^

exploit.cpp:327:43: error: ‘struct ext4_super_block’ has no member named ‘s_inode_size’

unsigned int off = index * super.s_inode_size;

^

exploit.cpp:328:64: error: ‘struct ext4_group_desc’ has no member named ‘bg_inode_table_lo’

unsigned long total_offset = block_size + (group_descr.bg_inode_table_lo-1) * block_size + off;

^

exploit.cpp:333:18: error: ‘struct ext4_inode’ has no member named ‘i_size_lo’

if(inode.i_size_lo == s.st_size) {

^

exploit.cpp:334:13: error: ‘__le16’ was not declared in this scope

__le16 mode = 0;

^

exploit.cpp:334:20: error: expected ‘;’ before ‘mode’

__le16 mode = 0;

^

exploit.cpp:338:19: error: ‘struct ext4_inode’ has no member named ‘i_mode’

inode.i_mode = inode.i_mode | 0x800;

^

exploit.cpp:338:34: error: ‘struct ext4_inode’ has no member named ‘i_mode’

inode.i_mode = inode.i_mode | 0x800;

^

exploit.cpp:340:41: error: ‘struct ext4_inode’ has no member named ‘i_mode’

int modesize = sizeof(inode.i_mode);

^

exploit.cpp:341:39: error: ‘struct ext4_inode’ has no member named ‘i_mode’

int wr = write(fd, &inode.i_mode, modesize);

^

exploit.cpp: In function ‘bool isSensord(char*)’:

exploit.cpp:392:46: error: ‘strstr’ was not declared in this scope

if(strstr(buff, "/system/bin/sensord") != NULL)

^

exploit.cpp: In function ‘int main(int, char**)’:

exploit.cpp:444:30: error: ‘strstr’ was not declared in this scope

if( strstr( argv[1], "1" ) != NULL) {

^