12385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch/* Copyright (c) 2013 The Chromium Authors. All rights reserved. 22385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch * Use of this source code is governed by a BSD-style license that can be 32385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch * found in the LICENSE file. */ 42385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch 52385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch#include "nacl_io/kernel_intercept.h" 62385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch#include "nacl_io/kernel_wrap.h" 72385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch 88bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)#if defined(__GLIBC__) && defined(__native_client__) 9d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// Glibc's remove(3) and unlink(2) entry points are not yet hooked up 10d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// to the lower level IRT interfaces. Therefore the only way to intercept 118bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)// these calls is to override them here. 12d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// TODO(sbc): remove this once glibc plumbing is in place for remove/unlink 13d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles) 142385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdochint remove(const char* path) { 152385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch return ki_remove(path); 162385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch} 17d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)#endif 18